0 | module BeTTI.Quotient
19 | (//) : (type : Type) -> (rel : type -> type -> Type) -> Type
24 | {0 rel : type -> type -> Type} ->
31 | (.because) : {0 rel : type -> type -> Type} ->
32 | (f : type -> motive) ->
33 | (0 indep : (x, y : type) -> rel x y -> (f x === f y) {a=motive}) ->
34 | (type // rel) -> motive
38 | quotient : {rel : type -> type -> Type} -> {x,y : type} ->
39 | rel x y -> ((class {type=type,rel} x) === (class {type,rel} y)) {a = type // rel}
40 | quotient prf = believe_me $
unsafePerformIO (do
41 | _ <- fPutStrLn stderr "Trying to execute function extensionality"
42 | exitWith {a = class {type,rel} x === class {type,rel} y} $
ExitFailure 1)
48 | f.because indep x = f x
53 | (.Because) : {0 rel : a -> a -> Type} ->
54 | {0 b : (x : a // rel) -> Type} ->
55 | (f : (x : a) -> b (class {type=a,rel} x)) ->
56 | (0 indep : (x, y : a) -> r x y ->
57 | f (class {type=a,rel} x) ~=~ f (class {type=a,rel} y)) ->
59 | f.Because indep x = f x