8 | FunExt : (f,g : a -> b) -> Type
9 | FunExt f g = (x : a) -> f x = g x
12 | funext : (f,g : a -> b) -> FunExt f g -> f = g
13 | funext f g prf = believe_me $
unsafePerformIO (do
14 | _ <- fPutStrLn stderr "Trying to execute function extensionality"
15 | exitWith {a = f = g} $
ExitFailure 1)
18 | FunExt0 : (f,g : (0 x :a) -> b) -> Type
19 | FunExt0 f g = (x : a) -> f x = g x
23 | funext0 : (f,g : (0 x : a) -> b) -> FunExt0 f g -> f = g
24 | funext0 f g prf = believe_me $
unsafePerformIO (do
25 | _ <- fPutStrLn stderr "Trying to execute function extensionality"
26 | exitWith {a = f = g} $
ExitFailure 1)
29 | DepFunExt : (b : a -> Type) -> (f,g : (x : a) -> b x) -> Type
30 | DepFunExt b f g = (x : a) -> f x = g x
33 | depfunext : (b : a -> Type) -> (f,g : (x : a) -> b x) -> DepFunExt b f g -> f = g
34 | depfunext b f g prf = believe_me $
unsafePerformIO (do
35 | _ <- fPutStrLn stderr "Trying to execute function extensionality"
36 | exitWith {a = f = g} $
ExitFailure 1)
39 | DepFunExtI : (b : a -> Type) -> (f,g : {x : a} -> b x) -> Type
40 | DepFunExtI b f g = (x : a) -> f {x} = g {x}
43 | depfunexti : (b : a -> Type) -> (f,g : {x : a} -> b x) ->
44 | DepFunExtI b f g -> Equal f g {a = {x : a} -> b x}
45 | depfunexti b f g prf =
49 | in the result $
believe_me $
the (IO result) $
unsafePerformIO (do
50 | _ <- fPutStrLn stderr "Trying to execute function extensionality"
51 | exitWith $
ExitFailure 1)
54 | DepFunExt0 : (b : a -> Type) -> (f,g : (0 x : a) -> b x) -> Type
55 | DepFunExt0 b f g = (x : a) -> f x = g x
59 | depfunext0 : (b : a -> Type) -> (f,g : (0 x : a) -> b x) -> DepFunExt0 b f g -> f = g
60 | depfunext0 b f g prf = believe_me $
unsafePerformIO (do
61 | _ <- fPutStrLn stderr "Trying to execute function extensionality"
62 | exitWith {a = f = g} $
ExitFailure 1)
66 | depcurryfunext : (b : a -> Type) -> (c : (x : a) -> b x -> Type) ->
67 | (f,g : (x :a) -> (y : b x) -> c x y) ->
68 | DepFunExt {a = DPair a b}
69 | (\(
x ** y)
=> c x y)
70 | (\(
x ** y)
=> f x y)
71 | (\(
x ** y)
=> g x y) -> f = g
72 | depcurryfunext b c f g prf =
73 | depfunext (\x => (y : b x) -> c x y) f g $
\x =>
74 | depfunext (\y => c x y) (f x) (g x) $
\y => prf (
x ** y)