simhu / cubical

Implementation of Univalence in Cubical Sets
MIT License
145 stars 10 forks source link

Trouble with reflexivity #1

Closed jonsterling closed 10 years ago

jonsterling commented 10 years ago

I don't fully understand how the cubical sets stuff works, so forgive me if I'm noting something obvious. Anyway, I was trying to prove that opBool3 in the BoolEqBool module was equivalent to orBool, defined as follows:

orBool : Bool -> Bool -> Bool
orBool = split
  true -> \x -> true
  false -> \x -> x

I first tried using funext, which I had trouble with, so I broke it down to simply constructing a term in Id Bool (orBool false true) (opBool3 false true); because the two evaluate to the same thing (true), I would have expected that refl Bool true would have sufficed, but during type checking, it cast out a marvelous cacophony of noise:

checking definition ["boom"]
Type checking failed: Id0 Bool19 true true =/= Id0 Bool19 true (snd16 Bool19 (\X1-> Pi Bool19 (\X2-> Pi Bool19 (\X3-> Bool19))) (J3 U Bool19 (\X1-> \X2-> Sigma9 X1 (\X3-> Pi X1 (\X4-> Pi X1 (\X5-> X1)))) (pair true andBool20) Bool19 (equivEq10 Bool19 Bool19 not21 (\X1-> pair (not21 X1) (notK33 X1)) (\X1-> \X2-> eqPropFam55 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) (\X3-> \X4-> \X5-> J3 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 X6 X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5) (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X1) X4 X6) (J3 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 X6 X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X4) (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X1) X4 X6) (J3 Bool19 (not21 X3) (\X6-> \X7-> Pi Bool19 (\X8-> Pi (Id0 Bool19 X6 X8) (\X9-> Id0 (Id0 Bool19 X6 X8) X9 (J3 Bool19 (not21 X3) (\X10-> \X11-> Id0 Bool19 X10 X8) (J3 Bool19 X6 (\X10-> \X11-> Id0 Bool19 (not21 X3) X10) X7 X8 X9) X6 X7)))) (\X6-> \X7-> J3 (Id0 Bool19 (not21 X3) X6) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (refl1 Bool19 (not21 X3)) X6 X7) (\X8-> \X9-> Id0 (Id0 Bool19 (not21 X3) X6) X7 X8) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 (Id0 Bool19 (not21 X3) X8) X9 (J3 Bool19 (not21 X3) (\X10-> \X11-> Id0 Bool19 (not21 X3) X10) (refl1 Bool19 (not21 X3)) X8 X9)) (Jeq4 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (refl1 Bool19 (not21 X3))) X6 X7) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 X8 X6) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (refl1 Bool19 (not21 X3)) X6 X7) (not21 X3) (refl1 Bool19 (not21 X3))) (Jeq4 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 X8 X6) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (refl1 Bool19 (not21 X3)) X6 X7))) (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X4) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 X6 X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5) (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (J3 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X4) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 X8 X1) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X4) (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 X8 X1) X6 (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))))) (refl1 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 X6 X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X4) (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))))) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5) (J3 (Id0 Bool19 (not21 X3) X1) (fst15 (Pi (Id0 Bool19 (not21 X3) X1) (\X6-> Id0 Bool19 (not21 X3) X1)) (\X6-> Pi (Id0 Bool19 (not21 X3) X1) (\X7-> Pi (Id0 Bool19 (not21 X3) X1) (\X8-> Id0 (Id0 Bool19 (not21 X3) X1) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) X1) (boolDec30 (not21 X3) X1)) X5) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X4) X6) (J3 (Id0 Bool19 (not21 X3) X1) (fst15 (Pi (Id0 Bool19 (not21 X3) X1) (\X6-> Id0 Bool19 (not21 X3) X1)) (\X6-> Pi (Id0 Bool19 (not21 X3) X1) (\X7-> Pi (Id0 Bool19 (not21 X3) X1) (\X8-> Id0 (Id0 Bool19 (not21 X3) X1) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) X1) (boolDec30 (not21 X3) X1)) X4) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X4) X6) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X6) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X6 X7) (fst15 (Pi (Id0 Bool19 (not21 X3) X6) (\X8-> Id0 Bool19 (not21 X3) X6)) (\X8-> Pi (Id0 Bool19 (not21 X3) X6) (\X9-> Pi (Id0 Bool19 (not21 X3) X6) (\X10-> Id0 (Id0 Bool19 (not21 X3) X6) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) X6) (boolDec30 (not21 X3) X6)) X7)) (J3 (Id0 Bool19 (not21 X3) (not21 X3)) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) X6 (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (refl1 (Id0 Bool19 (not21 X3) (not21 X3)) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) (not21 X3) (refl1 Bool19 (not21 X3))) (Jeq4 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))))) X1 X4) (fst15 (Pi (Id0 Bool19 (not21 X3) X1) (\X6-> Id0 Bool19 (not21 X3) X1)) (\X6-> Pi (Id0 Bool19 (not21 X3) X1) (\X7-> Pi (Id0 Bool19 (not21 X3) X1) (\X8-> Id0 (Id0 Bool19 (not21 X3) X1) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) X1) (boolDec30 (not21 X3) X1)) X5) (snd16 (Pi (Id0 Bool19 (not21 X3) X1) (\X6-> Id0 Bool19 (not21 X3) X1)) (\X6-> Pi (Id0 Bool19 (not21 X3) X1) (\X7-> Pi (Id0 Bool19 (not21 X3) X1) (\X8-> Id0 (Id0 Bool19 (not21 X3) X1) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) X1) (boolDec30 (not21 X3) X1)) X4 X5)) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5) (J3 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X1) X6 (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5)) (refl1 (Id0 Bool19 (not21 X3) X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5)) (fst15 (Pi (Id0 Bool19 (not21 X3) X1) (\X6-> Id0 Bool19 (not21 X3) X1)) (\X6-> Pi (Id0 Bool19 (not21 X3) X1) (\X7-> Pi (Id0 Bool19 (not21 X3) X1) (\X8-> Id0 (Id0 Bool19 (not21 X3) X1) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) X1) (boolDec30 (not21 X3) X1)) X5) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X6) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X6 X7) (fst15 (Pi (Id0 Bool19 (not21 X3) X6) (\X8-> Id0 Bool19 (not21 X3) X6)) (\X8-> Pi (Id0 Bool19 (not21 X3) X6) (\X9-> Pi (Id0 Bool19 (not21 X3) X6) (\X10-> Id0 (Id0 Bool19 (not21 X3) X6) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) X6) (boolDec30 (not21 X3) X6)) X7)) (J3 (Id0 Bool19 (not21 X3) (not21 X3)) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) X6 (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 Bool19 (not21 X3) (not21 X3))) (\X8-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X9-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X10-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X8 X9) (X8 X10)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (refl1 (Id0 Bool19 (not21 X3) (not21 X3)) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) (not21 X3) (refl1 Bool19 (not21 X3))) (Jeq4 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))))) X1 X5))))) X5 (J3 (Id0 Bool19 (not21 X3) X1) X5 (\X6-> \X7-> Id0 (Id0 Bool19 (not21 X3) X1) X6 X5) (refl1 (Id0 Bool19 (not21 X3) X1) X5) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 X6 X1) (J3 Bool19 (not21 X3) (\X6-> \X7-> Id0 Bool19 (not21 X3) X6) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5) (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3)))) (J3 Bool19 (not21 X3) (\X6-> \X7-> Pi Bool19 (\X8-> Pi (Id0 Bool19 X6 X8) (\X9-> Id0 (Id0 Bool19 X6 X8) X9 (J3 Bool19 (not21 X3) (\X10-> \X11-> Id0 Bool19 X10 X8) (J3 Bool19 X6 (\X10-> \X11-> Id0 Bool19 (not21 X3) X10) X7 X8 X9) X6 X7)))) (\X6-> \X7-> J3 (Id0 Bool19 (not21 X3) X6) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (refl1 Bool19 (not21 X3)) X6 X7) (\X8-> \X9-> Id0 (Id0 Bool19 (not21 X3) X6) X7 X8) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 (Id0 Bool19 (not21 X3) X8) X9 (J3 Bool19 (not21 X3) (\X10-> \X11-> Id0 Bool19 (not21 X3) X10) (refl1 Bool19 (not21 X3)) X8 X9)) (Jeq4 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (refl1 Bool19 (not21 X3))) X6 X7) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 X8 X6) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (refl1 Bool19 (not21 X3)) X6 X7) (not21 X3) (refl1 Bool19 (not21 X3))) (Jeq4 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 X8 X6) (J3 Bool19 (not21 X3) (\X8-> \X9-> Id0 Bool19 (not21 X3) X8) (refl1 Bool19 (not21 X3)) X6 X7))) (not21 X3) (fst15 (Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X6-> Id0 Bool19 (not21 X3) (not21 X3))) (\X6-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X7-> Pi (Id0 Bool19 (not21 X3) (not21 X3)) (\X8-> Id0 (Id0 Bool19 (not21 X3) (not21 X3)) (X6 X7) (X6 X8)))) (decConst58 (Id0 Bool19 (not21 X3) (not21 X3)) (boolDec30 (not21 X3) (not21 X3))) (refl1 Bool19 (not21 X3))) X1 X5))) (not21 X1) (notK33 X1) X2 (J3 Bool19 (not21 (not21 (not21 X1))) (\X3-> \X4-> Id0 Bool19 X3 (fst15 Bool19 (\X5-> Id0 Bool19 (not21 X5) X1) X2)) (J3 Bool19 (not21 (not21 (fst15 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) X2))) (\X3-> \X4-> Id0 Bool19 (not21 (not21 (not21 X1))) X3) (J3 Bool19 (not21 (not21 X1)) (\X3-> \X4-> Id0 Bool19 (not21 (not21 (not21 X1))) (not21 X3)) (refl1 Bool19 (not21 (not21 (not21 X1)))) (not21 (fst15 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) X2)) (J3 Bool19 X1 (\X3-> \X4-> Id0 Bool19 (not21 (not21 X1)) X3) (notK33 X1) (not21 (fst15 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) X2)) (J3 Bool19 (not21 (fst15 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) X2)) (\X3-> \X4-> Id0 Bool19 X3 (not21 (fst15 Bool19 (\X5-> Id0 Bool19 (not21 X5) X1) X2))) (refl1 Bool19 (not21 (fst15 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) X2))) X1 (snd16 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) X2)))) (fst15 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) X2) (notK33 (fst15 Bool19 (\X3-> Id0 Bool19 (not21 X3) X1) X2))) (not21 X1) (notK33 (not21 X1)))))) false true)
mortberg commented 10 years ago

The problem is that type checking is done on miniTT (MTT.hs) terms which don't know anything about the evaluation in the cubical set model (Eval.hs). Hence the typechecker can't figure out that the value of opBool3 false true is true. You can see this when looking at the (scary) output as everything is the same except for the third argument of Id which is opBool3 false true. A future goal is to develop a cubical type theory where the type checker knows how to compute with things in the cubical set model and in this language your example should work.

Also, I'm not sure that this can be proved with funExt either as you will most likely have to do some computations in the cubical set model for that proof as well. Maybe a better place to start if you want to play with funExt is to prove that two functions defined in standard type theory (ie that don't rely on computation in the cubical set model) are equal.

jonsterling commented 10 years ago

Thanks @mortberg! This is very interesting; you can feel free to close this issue if it's not intended to be addressed in this particular proof-of-concept.

CohenCyril commented 10 years ago

Hello, the new (experimental!) conv branch now uses the cubical evaluator for conversion during type checking. So your example (which you can find in examples/BoolEqBool.cub) now works. Enjoy!

jonsterling commented 10 years ago

Wow, that's great, thanks! Can't wait to poke around again.

CohenCyril commented 10 years ago

Please note it's very experimental (there still are problems) and there is still one file that does not typecheck (in a reasonable time at least) : examples/Kraus.cub.