From: Anders Mörtberg Date: Fri, 4 Dec 2015 00:25:12 +0000 (-0500) Subject: Add some test of normal forms X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=6dc6d04123ceca9a6a2409efc45f266017055efa;p=cubicaltt.git Add some test of normal forms --- diff --git a/examples/shortsetquot.ctt b/examples/shortsetquot.ctt index 3c3b50d..52b504e 100644 --- a/examples/shortsetquot.ctt +++ b/examples/shortsetquot.ctt @@ -184,9 +184,20 @@ test' : (P' true').1 = K' true' test'' : Id (P' true').1 test test' = (P' true').2 test test' + +-- Tests of checking normal forms: + +ntrue' : setquot bool R.1 = (\(x : bool) -> (IdP ( bool) true x,lem8 x),((\(P : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> \(f : (sig bool (\(x : bool) -> IdP ( bool) true x)) -> P.1) -> f ((true, true)),\(x1 x2 : bool) -> \(X1 : IdP ( bool) x1 x2) -> \(X2 : IdP ( bool) true x1) -> comp ( bool) (X2 @ i0) [ (i0 = 0) -> true, (i0 = 1) -> X1 @ i1 ]),\(x1 x2 : bool) -> \(X1 : IdP ( bool) true x1) -> \(X2 : IdP ( bool) true x2) -> comp ( bool) (X1 @ -i0) [ (i0 = 0) -> x1, (i0 = 1) -> X2 @ i1 ])) + +-- Why is this not working? +-- ntest : (P' true').1 = \(P : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> \(f : or (IdP ( sig (bool -> (sig U (\(X : U) -> (a b : X) -> IdP ( X) a b))) (\(A : bool -> (sig U (\(X : U) -> (a b : X) -> IdP ( X) a b))) -> sig (sig ((P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> ((sig bool (\(x : bool) -> (A x).1)) -> P0.1) -> P0.1) (\(_ : (P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> ((sig bool (\(x : bool) -> (A x).1)) -> P0.1) -> P0.1) -> (x1 x2 : bool) -> (IdP ( bool) x1 x2) -> ((A x1).1 -> (A x2).1))) (\(_ : sig ((P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> ((sig bool (\(x : bool) -> (A x).1)) -> P0.1) -> P0.1) (\(_ : (P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> ((sig bool (\(x : bool) -> (A x).1)) -> P0.1) -> P0.1) -> (x1 x2 : bool) -> (IdP ( bool) x1 x2) -> ((A x1).1 -> (A x2).1))) -> (x1 x2 : bool) -> (A x1).1 -> ((A x2).1 -> (IdP ( bool) x1 x2))))) ((\(x : bool) -> (IdP ( bool) true x,lem8 x),((\(P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> \(f : (sig bool (\(x : bool) -> IdP ( bool) true x)) -> P0.1) -> f ((true, true)),\(x1 x2 : bool) -> \(X1 : IdP ( bool) x1 x2) -> \(X2 : IdP ( bool) true x1) -> comp ( bool) (X2 @ i0) [ (i0 = 0) -> true, (i0 = 1) -> X1 @ i1 ]),\(x1 x2 : bool) -> \(X1 : IdP ( bool) true x1) -> \(X2 : IdP ( bool) true x2) -> comp ( bool) (X1 @ -i0) [ (i0 = 0) -> x1, (i0 = 1) -> X2 @ i1 ]))) ((\(x : bool) -> (IdP ( bool) true x,lem8 x),((\(P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> \(f : (sig bool (\(x : bool) -> IdP ( bool) true x)) -> P0.1) -> f ((true, true)),\(x1 x2 : bool) -> \(X1 : IdP ( bool) x1 x2) -> \(X2 : IdP ( bool) true x1) -> comp ( bool) (X2 @ i0) [ (i0 = 0) -> true, (i0 = 1) -> X1 @ i1 ]),\(x1 x2 : bool) -> \(X1 : IdP ( bool) true x1) -> \(X2 : IdP ( bool) true x2) -> comp ( bool) (X1 @ -i0) [ (i0 = 0) -> x1, (i0 = 1) -> X2 @ i1 ]))), IdP ( sig (bool -> (sig U (\(X : U) -> (a b : X) -> IdP ( X) a b))) (\(A : bool -> (sig U (\(X : U) -> (a b : X) -> IdP ( X) a b))) -> sig (sig ((P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> ((sig bool (\(x : bool) -> (A x).1)) -> P0.1) -> P0.1) (\(_ : (P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> ((sig bool (\(x : bool) -> (A x).1)) -> P0.1) -> P0.1) -> (x1 x2 : bool) -> (IdP ( bool) x1 x2) -> ((A x1).1 -> (A x2).1))) (\(_ : sig ((P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> ((sig bool (\(x : bool) -> (A x).1)) -> P0.1) -> P0.1) (\(_ : (P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> ((sig bool (\(x : bool) -> (A x).1)) -> P0.1) -> P0.1) -> (x1 x2 : bool) -> (IdP ( bool) x1 x2) -> ((A x1).1 -> (A x2).1))) -> (x1 x2 : bool) -> (A x1).1 -> ((A x2).1 -> (IdP ( bool) x1 x2))))) ((\(x : bool) -> (IdP ( bool) true x,lem8 x),((\(P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> \(f : (sig bool (\(x : bool) -> IdP ( bool) true x)) -> P0.1) -> f ((true, true)),\(x1 x2 : bool) -> \(X1 : IdP ( bool) x1 x2) -> \(X2 : IdP ( bool) true x1) -> comp ( bool) (X2 @ i0) [ (i0 = 0) -> true, (i0 = 1) -> X1 @ i1 ]),\(x1 x2 : bool) -> \(X1 : IdP ( bool) true x1) -> \(X2 : IdP ( bool) true x2) -> comp ( bool) (X1 @ -i0) [ (i0 = 0) -> x1, (i0 = 1) -> X2 @ i1 ]))) ((\(x : bool) -> (IdP ( bool) false x,lem7 x),((\(P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> \(f : (sig bool (\(x : bool) -> IdP ( bool) false x)) -> P0.1) -> f ((false, false)),\(x1 x2 : bool) -> \(X1 : IdP ( bool) x1 x2) -> \(X2 : IdP ( bool) false x1) -> comp ( bool) (X2 @ i0) [ (i0 = 0) -> false, (i0 = 1) -> X1 @ i1 ]),\(x1 x2 : bool) -> \(X1 : IdP ( bool) false x1) -> \(X2 : IdP ( bool) false x2) -> comp ( bool) (X1 @ -i0) [ (i0 = 0) -> x1, (i0 = 1) -> X2 @ i1 ])))) -> P.1) -> f (inl ( (\(x : bool) -> (IdP ( bool) true x,lem8 x),((\(P0 : sig U (\(X : U) -> (a b : X) -> IdP ( X) a b)) -> \(f0 : (sig bool (\(x : bool) -> IdP ( bool) true x)) -> P0.1) -> f0 ((true, true)),\(x1 x2 : bool) -> \(X1 : IdP ( bool) x1 x2) -> \(X2 : IdP ( bool) true x1) -> comp ( bool) (X2 @ i0) [ (i0 = 0) -> true, (i0 = 1) -> X1 @ i1 ]),\(x1 x2 : bool) -> \(X1 : IdP ( bool) true x1) -> \(X2 : IdP ( bool) true x2) -> comp ( bool) (X1 @ -i0) [ (i0 = 0) -> x1, (i0 = 1) -> X2 @ i1 ])))) + + + + + + +-- This is not true: -- test' : Id (P' true').1 (K' true') -- (hdisj_in1 (Id (setquot bool R.1) true' true') (Id (setquot bool R.1) true' false') (<_> true')) = -- <_> K' true' - --- This takes too long: --- > :n K' true'