import DiscreteGameTheory.Base
namespace Base
open SignGame
def intSign (a b : Int) : Sign :=
if a > b then .pos
else if a = b then .zero
else .neg
lemma intSign_refl (a : Int) : intSign a a = .zero := a:ℤ⊢ intSign a a = Sign.zero
All goals completed! 🐙
lemma intSign_antisym (a b : Int) : intSign a b = (intSign b a).flip := a:ℤb:ℤ⊢ intSign a b = (intSign b a).flip
a:ℤb:ℤ⊢ (if a > b then Sign.pos else if a = b then Sign.zero else Sign.neg) =
match if b > a then Sign.pos else if b = a then Sign.zero else Sign.neg with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero; a:ℤb:ℤh✝¹:a > bh✝:b > a⊢ Falsea:ℤb:ℤh✝²:a > bh✝¹:¬b > ah✝:b = a⊢ Falsea:ℤb:ℤh✝²:a > bh✝¹:¬b > ah✝:¬b = a⊢ Sign.pos =
match Sign.neg with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zeroa:ℤb:ℤh✝²:¬a > bh✝¹:a = bh✝:b > a⊢ Falsea:ℤb:ℤh✝³:¬a > bh✝²:a = bh✝¹:¬b > ah✝:b = a⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zeroa:ℤb:ℤh✝³:¬a > bh✝²:a = bh✝¹:¬b > ah✝:¬b = a⊢ Falsea:ℤb:ℤh✝²:¬a > bh✝¹:¬a = bh✝:b > a⊢ Sign.neg =
match Sign.pos with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zeroa:ℤb:ℤh✝³:¬a > bh✝²:¬a = bh✝¹:¬b > ah✝:b = a⊢ Falsea:ℤb:ℤh✝³:¬a > bh✝²:¬a = bh✝¹:¬b > ah✝:¬b = a⊢ False a:ℤb:ℤh✝¹:a > bh✝:b > a⊢ Falsea:ℤb:ℤh✝²:a > bh✝¹:¬b > ah✝:b = a⊢ Falsea:ℤb:ℤh✝²:a > bh✝¹:¬b > ah✝:¬b = a⊢ Sign.pos =
match Sign.neg with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zeroa:ℤb:ℤh✝²:¬a > bh✝¹:a = bh✝:b > a⊢ Falsea:ℤb:ℤh✝³:¬a > bh✝²:a = bh✝¹:¬b > ah✝:b = a⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zeroa:ℤb:ℤh✝³:¬a > bh✝²:a = bh✝¹:¬b > ah✝:¬b = a⊢ Falsea:ℤb:ℤh✝²:¬a > bh✝¹:¬a = bh✝:b > a⊢ Sign.neg =
match Sign.pos with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zeroa:ℤb:ℤh✝³:¬a > bh✝²:¬a = bh✝¹:¬b > ah✝:b = a⊢ Falsea:ℤb:ℤh✝³:¬a > bh✝²:¬a = bh✝¹:¬b > ah✝:¬b = a⊢ False first | a:ℤb:ℤh✝³:¬a > bh✝²:¬a = bh✝¹:¬b > ah✝:¬b = a⊢ False | All goals completed! 🐙
lemma intSign_trans (a b c : Int) :
(intSign a b).nonneg → (intSign b c).nonneg → (intSign a c).nonneg := a:ℤb:ℤc:ℤ⊢ (intSign a b).nonneg → (intSign b c).nonneg → (intSign a c).nonneg
a:ℤb:ℤc:ℤ⊢ (match if a > b then Sign.pos else if a = b then Sign.zero else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match if b > c then Sign.pos else if b = c then Sign.zero else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match if a > c then Sign.pos else if a = c then Sign.zero else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False; a:ℤb:ℤc:ℤh✝²:a > bh✝¹:b > ch✝:a > c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:a > bh✝²:b > ch✝¹:¬a > ch✝:a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:a > bh✝²:b > ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:a > bh✝²:¬b > ch✝¹:b = ch✝:a > c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:a > bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:a > bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:a > bh✝²:¬b > ch✝¹:¬b = ch✝:a > c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:a > bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:a > bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:¬a > bh✝²:a = bh✝¹:b > ch✝:a > c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:a = bh✝²:b > ch✝¹:¬a > ch✝:a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:a = bh✝²:b > ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:a = bh✝²:¬b > ch✝¹:b = ch✝:a > c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:a = bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:a = bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:a = bh✝²:¬b > ch✝¹:¬b = ch✝:a > c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:a = bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:a = bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:¬a > bh✝²:¬a = bh✝¹:b > ch✝:a > c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:¬a = bh✝²:b > ch✝¹:¬a > ch✝:a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:¬a = bh✝²:b > ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:¬a = bh✝²:¬b > ch✝¹:b = ch✝:a > c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:¬a = bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:¬a = bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:¬a = bh✝²:¬b > ch✝¹:¬b = ch✝:a > c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:¬a = bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:¬a = bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False a:ℤb:ℤc:ℤh✝²:a > bh✝¹:b > ch✝:a > c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:a > bh✝²:b > ch✝¹:¬a > ch✝:a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:a > bh✝²:b > ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:a > bh✝²:¬b > ch✝¹:b = ch✝:a > c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:a > bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:a > bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:a > bh✝²:¬b > ch✝¹:¬b = ch✝:a > c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:a > bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:a > bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:¬a > bh✝²:a = bh✝¹:b > ch✝:a > c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:a = bh✝²:b > ch✝¹:¬a > ch✝:a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:a = bh✝²:b > ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:a = bh✝²:¬b > ch✝¹:b = ch✝:a > c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:a = bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:a = bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:a = bh✝²:¬b > ch✝¹:¬b = ch✝:a > c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:a = bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:a = bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝³:¬a > bh✝²:¬a = bh✝¹:b > ch✝:a > c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:¬a = bh✝²:b > ch✝¹:¬a > ch✝:a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:¬a = bh✝²:b > ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:¬a = bh✝²:¬b > ch✝¹:b = ch✝:a > c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:¬a = bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:¬a = bh✝³:¬b > ch✝²:b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁴:¬a > bh✝³:¬a = bh✝²:¬b > ch✝¹:¬b = ch✝:a > c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.pos with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:¬a = bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.zero with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falsea:ℤb:ℤc:ℤh✝⁵:¬a > bh✝⁴:¬a = bh✝³:¬b > ch✝²:¬b = ch✝¹:¬a > ch✝:¬a = c⊢ (match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
(match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False) →
match Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False All goals completed! 🐙; All goals completed! 🐙
Construct a 2-player Bool game from payoff matrices.
Uses ofPayoffs to get axioms for free.
def game2x2 (u_TT u_TF u_FT u_FF : Int) (v_TT v_TF v_FT v_FF : Int) :
SignGame (Fin 2) (fun _ : Fin 2 => Bool) :=
SignGame.ofPayoffs (fun i s =>
if (i : ℕ) = 0 then
if s 0 then (if s 1 then u_TT else u_TF) else (if s 1 then u_FT else u_FF)
else
if s 0 then (if s 1 then v_TT else v_TF) else (if s 1 then v_FT else v_FF))
-- Prisoner's Dilemma: C = true, D = false
def pd := game2x2 3 0 5 1 3 5 0 1
theorem pd_nash_DD : pd.IsPureNash (fun _ => false) := ⊢ pd.IsPureNash fun x => false
intro i i:Fin 2v:Bool⊢ (pd.signAction i (fun x => false) ((fun x => false) i) v).nonneg; v:Bool⊢ (pd.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (pd.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg v:Bool⊢ (pd.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (pd.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg ⊢ (pd.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (pd.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg ⊢ (pd.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) false).nonneg⊢ (pd.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ (pd.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (pd.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg All goals completed! 🐙
theorem pd_not_nash_CC : ¬pd.IsPureNash (fun _ => true) := ⊢ ¬pd.IsPureNash fun x => true
h:pd.IsPureNash fun x => true⊢ False; h:pd.IsPureNash fun x => truethis:(pd.signAction 0 (fun x => true) ((fun x => true) 0) false).nonneg := h 0 false⊢ False; h:pd.IsPureNash fun x => true⊢ (pd.signAction 0 (fun x => true) ((fun x => true) 0) false).nonneg → False; All goals completed! 🐙
-- Matching Pennies: H = true, T = false
def mp := game2x2 1 0 0 1 0 1 1 0
theorem mp_no_pureNash : ∀ p : PureProfile (Fin 2) (fun _ : Fin 2 => Bool),
¬mp.IsPureNash p := ⊢ ∀ (p : PureProfile (Fin 2) fun x => Bool), ¬mp.IsPureNash p
intro p p:PureProfile (Fin 2) fun x => Boolhp:mp.IsPureNash p⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:mp.IsPureNash ph0t:(mp.signAction 0 p (p 0) true).nonneg := hp 0 true⊢ False; p:PureProfile (Fin 2) fun x => Boolhp:mp.IsPureNash ph0t:(mp.signAction 0 p (p 0) true).nonneg := hp 0 trueh0f:(mp.signAction 0 p (p 0) false).nonneg := hp 0 false⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:mp.IsPureNash ph0t:(mp.signAction 0 p (p 0) true).nonneg := hp 0 trueh0f:(mp.signAction 0 p (p 0) false).nonneg := hp 0 falseh1t:(mp.signAction 1 p (p 1) true).nonneg := hp 1 true⊢ False; p:PureProfile (Fin 2) fun x => Boolhp:mp.IsPureNash ph0t:(mp.signAction 0 p (p 0) true).nonneg := hp 0 trueh0f:(mp.signAction 0 p (p 0) false).nonneg := hp 0 falseh1t:(mp.signAction 1 p (p 1) true).nonneg := hp 1 trueh1f:(mp.signAction 1 p (p 1) false).nonneg := hp 1 false⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = trueh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = trueh1:p 1 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = falseh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = falseh1:p 1 = true⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = trueh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) >
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ p i else p 0) = true then
if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ p i else p 1) = true then 1 else 0) =
if ↑i = 0 then
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else
if (if h : 0 = i then ⋯ ▸ v else p 0) = true then
if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 0 else 1
else if (if h : 1 = i then ⋯ ▸ v else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else
if (if h : True then true else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) >
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑0 = 0 then
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else
if (if h : True then p 0 else p 0) = true then if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ p 0 else p 1) = true then 1 else 0) =
if ↑0 = 0 then
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else
if (if h : True then false else p 0) = true then
if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 0 else 1
else if (if h : 1 = 0 then ⋯ ▸ false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 1 else 0
else if (if h : True then true else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ true else p 0) = true then
if (if h : True then true else p 1) = true then 0 else 1
else if (if h : True then true else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) >
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.pos
else
if
(if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 1 else 0
else if (if h : True then p 1 else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ p 1 else p 0) = true then if (if h : True then p 1 else p 1) = true then 0 else 1
else if (if h : True then p 1 else p 1) = true then 1 else 0) =
if ↑1 = 0 then
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 1 else 0
else if (if h : True then false else p 1) = true then 0 else 1
else
if (if h : 0 = 1 then ⋯ ▸ false else p 0) = true then
if (if h : True then false else p 1) = true then 0 else 1
else if (if h : True then false else p 1) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = trueh1:p 1 = true⊢ False All goals completed! 🐙
-- Stag Hunt: S = true, H = false
def sh := game2x2 4 0 3 3 4 3 0 3
theorem sh_nash_SS : sh.IsPureNash (fun _ => true) := ⊢ sh.IsPureNash fun x => true
intro i i:Fin 2v:Bool⊢ (sh.signAction i (fun x => true) ((fun x => true) i) v).nonneg; v:Bool⊢ (sh.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg v:Bool⊢ (sh.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg ⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg ⊢ (sh.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) false).nonneg⊢ (sh.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg All goals completed! 🐙
theorem sh_nash_HH : sh.IsPureNash (fun _ => false) := ⊢ sh.IsPureNash fun x => false
intro i i:Fin 2v:Bool⊢ (sh.signAction i (fun x => false) ((fun x => false) i) v).nonneg; v:Bool⊢ (sh.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg v:Bool⊢ (sh.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg ⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg ⊢ (sh.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) false).nonneg⊢ (sh.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (sh.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg All goals completed! 🐙
-- Battle of the Sexes: O = true, F = false
def bos := game2x2 3 0 0 2 2 0 0 3
theorem bos_nash_OO : bos.IsPureNash (fun _ => true) := ⊢ bos.IsPureNash fun x => true
intro i i:Fin 2v:Bool⊢ (bos.signAction i (fun x => true) ((fun x => true) i) v).nonneg; v:Bool⊢ (bos.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg v:Bool⊢ (bos.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg ⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg ⊢ (bos.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) false).nonneg⊢ (bos.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg All goals completed! 🐙
theorem bos_nash_FF : bos.IsPureNash (fun _ => false) := ⊢ bos.IsPureNash fun x => false
intro i i:Fin 2v:Bool⊢ (bos.signAction i (fun x => false) ((fun x => false) i) v).nonneg; v:Bool⊢ (bos.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg v:Bool⊢ (bos.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg ⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg ⊢ (bos.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) false).nonneg⊢ (bos.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (bos.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg All goals completed! 🐙A 3-player coordination game: each player gets payoff 1 if all agree, 0 otherwise.
def coordGame3 : SignGame (Fin 3) (fun _ : Fin 3 => Bool) where
sign _i p q :=
let allAgree (s : ∀ _ : Fin 3, Bool) : Bool := s 0 == s 1 && s 1 == s 2
let payP : Int := if allAgree p then 1 else 0
let payQ : Int := if allAgree q then 1 else 0
intSign payP payQ
sign_refl _i p := _i:Fin 3p:PureProfile (Fin 3) fun x => Bool⊢ (let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree p = true then 1 else 0;
let payQ := if allAgree p = true then 1 else 0;
intSign payP payQ) =
Sign.zero All goals completed! 🐙
sign_antisym _i p q := _i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Bool⊢ (let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree p = true then 1 else 0;
let payQ := if allAgree q = true then 1 else 0;
intSign payP payQ) =
(let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree q = true then 1 else 0;
let payQ := if allAgree p = true then 1 else 0;
intSign payP payQ).flip
_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Bool⊢ (if (if (p 0 == p 1 && p 1 == p 2) = true then 1 else 0) > if (q 0 == q 1 && q 1 == q 2) = true then 1 else 0 then
Sign.pos
else
if (if (p 0 == p 1 && p 1 == p 2) = true then 1 else 0) = if (q 0 == q 1 && q 1 == q 2) = true then 1 else 0 then
Sign.zero
else Sign.neg) =
match
if (if (q 0 == q 1 && q 1 == q 2) = true then 1 else 0) > if (p 0 == p 1 && p 1 == p 2) = true then 1 else 0 then
Sign.pos
else
if (if (q 0 == q 1 && q 1 == q 2) = true then 1 else 0) = if (p 0 == p 1 && p 1 == p 2) = true then 1 else 0 then
Sign.zero
else Sign.neg with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero; _i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(q 0 == q 1 && q 1 == q 2) = trueh✝:1 > 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:(p 0 == p 1 && p 1 == p 2) = trueh✝²:(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬1 > 1h✝:1 = 1⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:(p 0 == p 1 && p 1 == p 2) = trueh✝²:(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬1 > 1h✝:¬1 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:(p 0 == p 1 && p 1 == p 2) = trueh✝²:¬(q 0 == q 1 && q 1 == q 2) = trueh✝¹:1 > 0h✝:0 > 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:(p 0 == p 1 && p 1 == p 2) = trueh✝³:¬(q 0 == q 1 && q 1 == q 2) = trueh✝²:1 > 0h✝¹:¬0 > 1h✝:0 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:(p 0 == p 1 && p 1 == p 2) = trueh✝³:¬(q 0 == q 1 && q 1 == q 2) = trueh✝²:1 > 0h✝¹:¬0 > 1h✝:¬0 = 1⊢ Sign.pos =
match Sign.neg with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:(p 0 == p 1 && p 1 == p 2) = trueh✝³:¬(q 0 == q 1 && q 1 == q 2) = trueh✝²:¬1 > 0h✝¹:1 = 0h✝:0 > 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:¬(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬1 > 0h✝²:1 = 0h✝¹:¬0 > 1h✝:0 = 1⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:¬(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬1 > 0h✝²:1 = 0h✝¹:¬0 > 1h✝:¬0 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:(p 0 == p 1 && p 1 == p 2) = trueh✝³:¬(q 0 == q 1 && q 1 == q 2) = trueh✝²:¬1 > 0h✝¹:¬1 = 0h✝:0 > 1⊢ Sign.neg =
match Sign.pos with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:¬(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬1 > 0h✝²:¬1 = 0h✝¹:¬0 > 1h✝:0 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:¬(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬1 > 0h✝²:¬1 = 0h✝¹:¬0 > 1h✝:¬0 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:¬(p 0 == p 1 && p 1 == p 2) = trueh✝²:(q 0 == q 1 && q 1 == q 2) = trueh✝¹:0 > 1h✝:1 > 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:¬(p 0 == p 1 && p 1 == p 2) = trueh✝³:(q 0 == q 1 && q 1 == q 2) = trueh✝²:0 > 1h✝¹:¬1 > 0h✝:1 = 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:¬(p 0 == p 1 && p 1 == p 2) = trueh✝³:(q 0 == q 1 && q 1 == q 2) = trueh✝²:0 > 1h✝¹:¬1 > 0h✝:¬1 = 0⊢ Sign.pos =
match Sign.neg with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:¬(p 0 == p 1 && p 1 == p 2) = trueh✝³:(q 0 == q 1 && q 1 == q 2) = trueh✝²:¬0 > 1h✝¹:0 = 1h✝:1 > 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:¬(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬0 > 1h✝²:0 = 1h✝¹:¬1 > 0h✝:1 = 0⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:¬(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬0 > 1h✝²:0 = 1h✝¹:¬1 > 0h✝:¬1 = 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:¬(p 0 == p 1 && p 1 == p 2) = trueh✝³:(q 0 == q 1 && q 1 == q 2) = trueh✝²:¬0 > 1h✝¹:¬0 = 1h✝:1 > 0⊢ Sign.neg =
match Sign.pos with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:¬(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬0 > 1h✝²:¬0 = 1h✝¹:¬1 > 0h✝:1 = 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:¬(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬0 > 1h✝²:¬0 = 1h✝¹:¬1 > 0h✝:¬1 = 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(q 0 == q 1 && q 1 == q 2) = trueh✝:0 > 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:¬(p 0 == p 1 && p 1 == p 2) = trueh✝²:¬(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬0 > 0h✝:0 = 0⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:¬(p 0 == p 1 && p 1 == p 2) = trueh✝²:¬(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬0 > 0h✝:¬0 = 0⊢ False _i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(q 0 == q 1 && q 1 == q 2) = trueh✝:1 > 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:(p 0 == p 1 && p 1 == p 2) = trueh✝²:(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬1 > 1h✝:1 = 1⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:(p 0 == p 1 && p 1 == p 2) = trueh✝²:(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬1 > 1h✝:¬1 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:(p 0 == p 1 && p 1 == p 2) = trueh✝²:¬(q 0 == q 1 && q 1 == q 2) = trueh✝¹:1 > 0h✝:0 > 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:(p 0 == p 1 && p 1 == p 2) = trueh✝³:¬(q 0 == q 1 && q 1 == q 2) = trueh✝²:1 > 0h✝¹:¬0 > 1h✝:0 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:(p 0 == p 1 && p 1 == p 2) = trueh✝³:¬(q 0 == q 1 && q 1 == q 2) = trueh✝²:1 > 0h✝¹:¬0 > 1h✝:¬0 = 1⊢ Sign.pos =
match Sign.neg with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:(p 0 == p 1 && p 1 == p 2) = trueh✝³:¬(q 0 == q 1 && q 1 == q 2) = trueh✝²:¬1 > 0h✝¹:1 = 0h✝:0 > 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:¬(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬1 > 0h✝²:1 = 0h✝¹:¬0 > 1h✝:0 = 1⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:¬(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬1 > 0h✝²:1 = 0h✝¹:¬0 > 1h✝:¬0 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:(p 0 == p 1 && p 1 == p 2) = trueh✝³:¬(q 0 == q 1 && q 1 == q 2) = trueh✝²:¬1 > 0h✝¹:¬1 = 0h✝:0 > 1⊢ Sign.neg =
match Sign.pos with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:¬(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬1 > 0h✝²:¬1 = 0h✝¹:¬0 > 1h✝:0 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:¬(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬1 > 0h✝²:¬1 = 0h✝¹:¬0 > 1h✝:¬0 = 1⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:¬(p 0 == p 1 && p 1 == p 2) = trueh✝²:(q 0 == q 1 && q 1 == q 2) = trueh✝¹:0 > 1h✝:1 > 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:¬(p 0 == p 1 && p 1 == p 2) = trueh✝³:(q 0 == q 1 && q 1 == q 2) = trueh✝²:0 > 1h✝¹:¬1 > 0h✝:1 = 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:¬(p 0 == p 1 && p 1 == p 2) = trueh✝³:(q 0 == q 1 && q 1 == q 2) = trueh✝²:0 > 1h✝¹:¬1 > 0h✝:¬1 = 0⊢ Sign.pos =
match Sign.neg with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:¬(p 0 == p 1 && p 1 == p 2) = trueh✝³:(q 0 == q 1 && q 1 == q 2) = trueh✝²:¬0 > 1h✝¹:0 = 1h✝:1 > 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:¬(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬0 > 1h✝²:0 = 1h✝¹:¬1 > 0h✝:1 = 0⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:¬(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬0 > 1h✝²:0 = 1h✝¹:¬1 > 0h✝:¬1 = 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁴:¬(p 0 == p 1 && p 1 == p 2) = trueh✝³:(q 0 == q 1 && q 1 == q 2) = trueh✝²:¬0 > 1h✝¹:¬0 = 1h✝:1 > 0⊢ Sign.neg =
match Sign.pos with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:¬(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬0 > 1h✝²:¬0 = 1h✝¹:¬1 > 0h✝:1 = 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝⁵:¬(p 0 == p 1 && p 1 == p 2) = trueh✝⁴:(q 0 == q 1 && q 1 == q 2) = trueh✝³:¬0 > 1h✝²:¬0 = 1h✝¹:¬1 > 0h✝:¬1 = 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(q 0 == q 1 && q 1 == q 2) = trueh✝:0 > 0⊢ False_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:¬(p 0 == p 1 && p 1 == p 2) = trueh✝²:¬(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬0 > 0h✝:0 = 0⊢ Sign.zero =
match Sign.zero with
| Sign.pos => Sign.neg
| Sign.neg => Sign.pos
| Sign.zero => Sign.zero_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:¬(p 0 == p 1 && p 1 == p 2) = trueh✝²:¬(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬0 > 0h✝:¬0 = 0⊢ False first | _i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolh✝³:¬(p 0 == p 1 && p 1 == p 2) = trueh✝²:¬(q 0 == q 1 && q 1 == q 2) = trueh✝¹:¬0 > 0h✝:¬0 = 0⊢ False | All goals completed! 🐙
sign_trans _i p q r := _i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Bool⊢ (let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree p = true then 1 else 0;
let payQ := if allAgree q = true then 1 else 0;
intSign payP payQ).nonneg →
(let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree q = true then 1 else 0;
let payQ := if allAgree r = true then 1 else 0;
intSign payP payQ).nonneg →
(let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree p = true then 1 else 0;
let payQ := if allAgree r = true then 1 else 0;
intSign payP payQ).nonneg
intro hpq _i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolhpq:(let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree p = true then 1 else 0;
let payQ := if allAgree q = true then 1 else 0;
intSign payP payQ).nonneghqr:(let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree q = true then 1 else 0;
let payQ := if allAgree r = true then 1 else 0;
intSign payP payQ).nonneg⊢ (let allAgree := fun s => s 0 == s 1 && s 1 == s 2;
let payP := if allAgree p = true then 1 else 0;
let payQ := if allAgree r = true then 1 else 0;
intSign payP payQ).nonneg; _i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolhpq:(intSign (if (p 0 == p 1 && p 1 == p 2) = true then 1 else 0)
(if (q 0 == q 1 && q 1 == q 2) = true then 1 else 0)).nonneghqr:(intSign (if (q 0 == q 1 && q 1 == q 2) = true then 1 else 0)
(if (r 0 == r 1 && r 1 == r 2) = true then 1 else 0)).nonneg⊢ (intSign (if (p 0 == p 1 && p 1 == p 2) = true then 1 else 0)
(if (r 0 == r 1 && r 1 == r 2) = true then 1 else 0)).nonneg
_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(r 0 == r 1 && r 1 == r 2) = trueh✝:(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 1 1).nonneghqr:(intSign 1 1).nonneg⊢ (intSign 1 1).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(r 0 == r 1 && r 1 == r 2) = trueh✝:¬(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 1 0).nonneghqr:(intSign 0 1).nonneg⊢ (intSign 1 1).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(r 0 == r 1 && r 1 == r 2) = trueh✝:(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 1 1).nonneghqr:(intSign 1 0).nonneg⊢ (intSign 1 0).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(r 0 == r 1 && r 1 == r 2) = trueh✝:¬(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 1 0).nonneghqr:(intSign 0 0).nonneg⊢ (intSign 1 0).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(r 0 == r 1 && r 1 == r 2) = trueh✝:(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 0 1).nonneghqr:(intSign 1 1).nonneg⊢ (intSign 0 1).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(r 0 == r 1 && r 1 == r 2) = trueh✝:¬(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 0 0).nonneghqr:(intSign 0 1).nonneg⊢ (intSign 0 1).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(r 0 == r 1 && r 1 == r 2) = trueh✝:(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 0 1).nonneghqr:(intSign 1 0).nonneg⊢ (intSign 0 0).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(r 0 == r 1 && r 1 == r 2) = trueh✝:¬(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 0 0).nonneghqr:(intSign 0 0).nonneg⊢ (intSign 0 0).nonneg _i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(r 0 == r 1 && r 1 == r 2) = trueh✝:(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 1 1).nonneghqr:(intSign 1 1).nonneg⊢ (intSign 1 1).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(r 0 == r 1 && r 1 == r 2) = trueh✝:¬(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 1 0).nonneghqr:(intSign 0 1).nonneg⊢ (intSign 1 1).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(r 0 == r 1 && r 1 == r 2) = trueh✝:(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 1 1).nonneghqr:(intSign 1 0).nonneg⊢ (intSign 1 0).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(r 0 == r 1 && r 1 == r 2) = trueh✝:¬(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 1 0).nonneghqr:(intSign 0 0).nonneg⊢ (intSign 1 0).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(r 0 == r 1 && r 1 == r 2) = trueh✝:(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 0 1).nonneghqr:(intSign 1 1).nonneg⊢ (intSign 0 1).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:(r 0 == r 1 && r 1 == r 2) = trueh✝:¬(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 0 0).nonneghqr:(intSign 0 1).nonneg⊢ (intSign 0 1).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(r 0 == r 1 && r 1 == r 2) = trueh✝:(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 0 1).nonneghqr:(intSign 1 0).nonneg⊢ (intSign 0 0).nonneg_i:Fin 3p:PureProfile (Fin 3) fun x => Boolq:PureProfile (Fin 3) fun x => Boolr:PureProfile (Fin 3) fun x => Boolh✝²:¬(p 0 == p 1 && p 1 == p 2) = trueh✝¹:¬(r 0 == r 1 && r 1 == r 2) = trueh✝:¬(q 0 == q 1 && q 1 == q 2) = truehpq:(intSign 0 0).nonneghqr:(intSign 0 0).nonneg⊢ (intSign 0 0).nonneg All goals completed! 🐙
theorem coordGame3_nash_allTrue : coordGame3.IsPureNash (fun _ => true) := ⊢ coordGame3.IsPureNash fun x => true
intro i i:Fin 3v:Bool⊢ (coordGame3.signAction i (fun x => true) ((fun x => true) i) v).nonneg; v:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) v).nonnegv:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨2, ⋯⟩)) v).nonneg v:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) v).nonnegv:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨2, ⋯⟩)) v).nonneg ⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨2, ⋯⟩)) false).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨2, ⋯⟩)) true).nonneg ⊢ (coordGame3.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) false).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨2, ⋯⟩)) false).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => true) ((fun x => true) ((fun i => i) ⟨2, ⋯⟩)) true).nonneg All goals completed! 🐙
theorem coordGame3_nash_allFalse : coordGame3.IsPureNash (fun _ => false) := ⊢ coordGame3.IsPureNash fun x => false
intro i i:Fin 3v:Bool⊢ (coordGame3.signAction i (fun x => false) ((fun x => false) i) v).nonneg; v:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonnegv:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨2, ⋯⟩)) v).nonneg v:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonnegv:Bool⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨2, ⋯⟩)) v).nonneg ⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨2, ⋯⟩)) false).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨2, ⋯⟩)) true).nonneg ⊢ (coordGame3.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) false).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨2, ⋯⟩)) false).nonneg⊢ (coordGame3.signAction ((fun i => i) ⟨2, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨2, ⋯⟩)) true).nonneg All goals completed! 🐙
theorem coordGame3_not_nash_mixed :
¬coordGame3.IsPureNash (fun i : Fin 3 => if i = 0 then true else false) := ⊢ ¬coordGame3.IsPureNash fun i => if i = 0 then true else false
h:coordGame3.IsPureNash fun i => if i = 0 then true else false⊢ False; h:coordGame3.IsPureNash fun i => if i = 0 then true else falsethis:(coordGame3.signAction 0 (fun i => if i = 0 then true else false) ((fun i => if i = 0 then true else false) 0)
false).nonneg :=
h 0 false⊢ False; h:coordGame3.IsPureNash fun i => if i = 0 then true else false⊢ (coordGame3.signAction 0 (fun i => if i = 0 then true else false) ((fun i => if i = 0 then true else false) 0)
false).nonneg →
False; All goals completed! 🐙The Prisoner's Dilemma has a unique pure Nash equilibrium at (D,D). This illustrates the central tension of PD: mutual cooperation is Pareto-better but not an equilibrium.
theorem pd_unique_pureNash :
∀ p : PureProfile (Fin 2) (fun _ : Fin 2 => Bool),
pd.IsPureNash p ↔ p = (fun _ => false) := ⊢ ∀ (p : PureProfile (Fin 2) fun x => Bool), pd.IsPureNash p ↔ p = fun x => false
p:PureProfile (Fin 2) fun x => Bool⊢ pd.IsPureNash p ↔ p = fun x => false
p:PureProfile (Fin 2) fun x => Bool⊢ pd.IsPureNash p → p = fun x => falsep:PureProfile (Fin 2) fun x => Bool⊢ (p = fun x => false) → pd.IsPureNash p
p:PureProfile (Fin 2) fun x => Bool⊢ pd.IsPureNash p → p = fun x => false p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash p⊢ p = fun x => false
p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => false⊢ False
have : ∃ i, p i = true := ⊢ ∀ (p : PureProfile (Fin 2) fun x => Bool), pd.IsPureNash p ↔ p = fun x => false
p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehall:¬∃ i, p i = true⊢ False; p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehall:∀ (i : Fin 2), p i ≠ true⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehall:∀ (i : Fin 2), p i ≠ true⊢ p = fun x => false; p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehall:∀ (i : Fin 2), p i ≠ truei:Fin 2⊢ p i = false; All goals completed! 🐙
p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsei:Fin 2hi:p i = true⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsei:Fin 2hi:p i = truehpi:(pd.signAction i p (p i) false).nonneg := hp i false⊢ False; p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsei:Fin 2hi:p i = truehpi:(pd.signAction i p (p i) false).nonneg := hp i falsehpi':(pd.signAction i p (p i) true).nonneg := hp i true⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨0, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨0, ⋯⟩) p (p ((fun i => i) ⟨0, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨0, ⋯⟩) p (p ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonneg⊢ False p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨0, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨0, ⋯⟩) p (p ((fun i => i) ⟨0, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨0, ⋯⟩) p (p ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonneg⊢ False (p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = trueh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = trueh1:p 1 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = falseh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = falseh1:p 1 = true⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = trueh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:pd.IsPureNash ph:¬p = fun x => falsehi:p ((fun i => i) ⟨1, ⋯⟩) = truehpi:(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) false).nonneghpi':(pd.signAction ((fun i => i) ⟨1, ⋯⟩) p (p ((fun i => i) ⟨1, ⋯⟩)) true).nonnegh0:p 0 = trueh1:p 1 = true⊢ False
All goals completed! 🐙)
p:PureProfile (Fin 2) fun x => Bool⊢ (p = fun x => false) → pd.IsPureNash p ⊢ pd.IsPureNash fun x => false; All goals completed! 🐙
Matching Pennies has no pure Nash equilibrium (mp_no_pureNash), but the
fully mixed profile where both players play {H, T} is a Nash equilibrium
in the sign-game sense: no face strictly dominates the full face.
theorem mp_mixed_nash : mp.IsNash (fun _ : Fin 2 => Face.full (V := Bool)) := ⊢ mp.IsNash fun x => Face.full
intro i i:Fin 2A:Face ((fun x => Bool) i)⊢ ¬mp.StrictDom i (fun x => Face.full) A i:Fin 2A:Face ((fun x => Bool) i)hfwd:mp.Dominates i (fun x => Face.full) A ((fun x => Face.full) i)right✝:¬mp.Dominates i (fun x => Face.full) ((fun x => Face.full) i) A⊢ False
i:Fin 2A:Face ((fun x => Bool) i)hfwd:mp.Dominates i (fun x => Face.full) A ((fun x => Face.full) i)right✝:¬mp.Dominates i (fun x => Face.full) ((fun x => Face.full) i) Aa:Boolha:a ∈ ↑A⊢ False
i:Fin 2A:Face ((fun x => Bool) i)hfwd:mp.Dominates i (fun x => Face.full) A ((fun x => Face.full) i)right✝:¬mp.Dominates i (fun x => Face.full) ((fun x => Face.full) i) Aa:Boolha:a ∈ ↑Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) i p := fun x x_1 x_2 => Finset.mem_univ (x x_1)⊢ False
i:Fin 2A:Face ((fun x => Bool) i)hfwd:mp.Dominates i (fun x => Face.full) A ((fun x => Face.full) i)right✝:¬mp.Dominates i (fun x => Face.full) ((fun x => Face.full) i) Aa:Boolha:a ∈ ↑Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) i p := fun x x_1 x_2 => Finset.mem_univ (x x_1)h1:(mp.signAction i (fun x => true) a !a).nonneg := hfwd a ha (fun x => true) (hcon fun x => true) (!a) (Finset.mem_univ !a)⊢ False
i:Fin 2A:Face ((fun x => Bool) i)hfwd:mp.Dominates i (fun x => Face.full) A ((fun x => Face.full) i)right✝:¬mp.Dominates i (fun x => Face.full) ((fun x => Face.full) i) Aa:Boolha:a ∈ ↑Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) i p := fun x x_1 x_2 => Finset.mem_univ (x x_1)h1:(mp.signAction i (fun x => true) a !a).nonneg := hfwd a ha (fun x => true) (hcon fun x => true) (!a) (Finset.mem_univ !a)h2:(mp.signAction i (fun x => false) a !a).nonneg := hfwd a ha (fun x => false) (hcon fun x => false) (!a) (Finset.mem_univ !a)⊢ False
a:BoolA:Face ((fun x => Bool) ((fun i => i) ⟨0, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨0, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨0, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩)) Aha:a ∈ ↑Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩) ph1:(mp.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) a !a).nonnegh2:(mp.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) a !a).nonneg⊢ Falsea:BoolA:Face ((fun x => Bool) ((fun i => i) ⟨1, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩)) Aha:a ∈ ↑Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩) ph1:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) a !a).nonnegh2:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) a !a).nonneg⊢ False a:BoolA:Face ((fun x => Bool) ((fun i => i) ⟨0, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨0, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨0, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩)) Aha:a ∈ ↑Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩) ph1:(mp.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) a !a).nonnegh2:(mp.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) a !a).nonneg⊢ Falsea:BoolA:Face ((fun x => Bool) ((fun i => i) ⟨1, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩)) Aha:a ∈ ↑Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩) ph1:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) a !a).nonnegh2:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) a !a).nonneg⊢ False A:Face ((fun x => Bool) ((fun i => i) ⟨1, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩)) Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩) pha:false ∈ ↑Ah1:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) false !false).nonnegh2:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) false !false).nonneg⊢ FalseA:Face ((fun x => Bool) ((fun i => i) ⟨1, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩)) Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩) pha:true ∈ ↑Ah1:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) true !true).nonnegh2:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) true !true).nonneg⊢ False A:Face ((fun x => Bool) ((fun i => i) ⟨0, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨0, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨0, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩)) Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩) pha:false ∈ ↑Ah1:(mp.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) false !false).nonnegh2:(mp.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) false !false).nonneg⊢ FalseA:Face ((fun x => Bool) ((fun i => i) ⟨0, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨0, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨0, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩)) Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨0, ⋯⟩) pha:true ∈ ↑Ah1:(mp.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => true) true !true).nonnegh2:(mp.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) true !true).nonneg⊢ FalseA:Face ((fun x => Bool) ((fun i => i) ⟨1, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩)) Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩) pha:false ∈ ↑Ah1:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) false !false).nonnegh2:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) false !false).nonneg⊢ FalseA:Face ((fun x => Bool) ((fun i => i) ⟨1, ⋯⟩))hfwd:mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) A ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩))right✝:¬mp.Dominates ((fun i => i) ⟨1, ⋯⟩) (fun x => Face.full) ((fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩)) Ahcon:∀ (p : Fin 2 → Bool), ConsistentAt (fun x => Face.full) ((fun i => i) ⟨1, ⋯⟩) pha:true ∈ ↑Ah1:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => true) true !true).nonnegh2:(mp.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) true !true).nonneg⊢ False All goals completed! 🐙The Dominates ordering is genuinely partial on mixed profiles: in Matching Pennies, when the opponent plays the full face {H,T}, neither {H} nor {T} dominates the other for player 0. This shows that sign-game dominance is not a total order on faces.
theorem mp_partial_order :
let σ : Profile (Fin 2) (fun _ : Fin 2 => Bool) := fun _ => Face.full
¬mp.Dominates 0 σ (Face.vertex true) (Face.vertex false) ∧
¬mp.Dominates 0 σ (Face.vertex false) (Face.vertex true) := ⊢ let σ := fun x => Face.full;
¬mp.Dominates 0 σ (Face.vertex true) (Face.vertex false) ∧ ¬mp.Dominates 0 σ (Face.vertex false) (Face.vertex true)
h:mp.Dominates 0 (fun x => Face.full) (Face.vertex true) (Face.vertex false)⊢ Falseh:mp.Dominates 0 (fun x => Face.full) (Face.vertex false) (Face.vertex true)⊢ False
h:mp.Dominates 0 (fun x => Face.full) (Face.vertex true) (Face.vertex false)⊢ False h:mp.Dominates 0 (fun x => Face.full) (Face.vertex true) (Face.vertex false)this:(mp.signAction 0 (fun x => false) true false).nonneg :=
h true (Finset.mem_singleton_self true) (fun x => false) (fun x x_1 => Finset.mem_univ false) false
(Finset.mem_singleton_self false)⊢ False
All goals completed! 🐙
h:mp.Dominates 0 (fun x => Face.full) (Face.vertex false) (Face.vertex true)⊢ False h:mp.Dominates 0 (fun x => Face.full) (Face.vertex false) (Face.vertex true)this:(mp.signAction 0 (fun x => true) false true).nonneg :=
h false (Finset.mem_singleton_self false) (fun x => true) (fun x x_1 => Finset.mem_univ true) true
(Finset.mem_singleton_self true)⊢ False
All goals completed! 🐙
Build a symmetric 2-player game from a ranking function.
rank me opp gives the ordinal payoff when I play me and my opponent plays opp.
Symmetry means both players share the same ranking function.
def symGame2x2 (rank : Bool → Bool → ℕ) :
SignGame (Fin 2) (fun _ : Fin 2 => Bool) :=
SignGame.ofPayoffs (fun i s => (rank (s i) (s (1 - i)) : Int))Build an asymmetric 2-player game from per-player ranking functions.
def game2x2_rank (rank₀ rank₁ : Bool → Bool → ℕ) :
SignGame (Fin 2) (fun _ : Fin 2 => Bool) :=
SignGame.ofPayoffs (fun i s =>
if (i : ℕ) = 0 then (rank₀ (s 0) (s 1) : Int)
else (rank₁ (s 1) (s 0) : Int))
-- Prisoner's Dilemma via ranking: C = true, D = false
def pd_rank (me opp : Bool) : ℕ :=
match me, opp with
| true, false => 0 -- I cooperate, they defect (worst)
| false, false => 1 -- both defect
| true, true => 2 -- both cooperate
| false, true => 3 -- I defect, they cooperate (best
def pd' := symGame2x2 pd_rank
lemma pd'_nash_DD : pd'.IsPureNash (fun _ => false) := ⊢ pd'.IsPureNash fun x => false
intro i i:Fin 2v:Bool⊢ (pd'.signAction i (fun x => false) ((fun x => false) i) v).nonneg; v:Bool⊢ (pd'.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (pd'.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg v:Bool⊢ (pd'.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) v).nonnegv:Bool⊢ (pd'.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) v).nonneg ⊢ (pd'.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (pd'.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg ⊢ (pd'.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) false).nonneg⊢ (pd'.signAction ((fun i => i) ⟨0, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨0, ⋯⟩)) true).nonneg⊢ (pd'.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) false).nonneg⊢ (pd'.signAction ((fun i => i) ⟨1, ⋯⟩) (fun x => false) ((fun x => false) ((fun i => i) ⟨1, ⋯⟩)) true).nonneg All goals completed! 🐙
lemma pd'_not_nash_CC : ¬pd'.IsPureNash (fun _ => true) := ⊢ ¬pd'.IsPureNash fun x => true
h:pd'.IsPureNash fun x => true⊢ False; h:pd'.IsPureNash fun x => truethis:(pd'.signAction 0 (fun x => true) ((fun x => true) 0) false).nonneg := h 0 false⊢ False; h:pd'.IsPureNash fun x => true⊢ (pd'.signAction 0 (fun x => true) ((fun x => true) 0) false).nonneg → False; All goals completed! 🐙Two ranking functions that differ by an affine transform produce the same sign function, illustrating ordinal invariance.
def pd_rank_alt (me opp : Bool) : ℕ :=
match me, opp with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40
theorem pd_same_game :
(symGame2x2 pd_rank).sign = (symGame2x2 pd_rank_alt).sign := ⊢ (symGame2x2 pd_rank).sign = (symGame2x2 pd_rank_alt).sign
i:Fin 2p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Bool⊢ (symGame2x2 pd_rank).sign i p q = (symGame2x2 pd_rank_alt).sign i p q
i:Fin 2p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Bool⊢ (if
↑(match p i, p (1 - i) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q i, q (1 - i) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p i, p (1 - i) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q i, q (1 - i) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p i, p (1 - i) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q i, q (1 - i) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p i, p (1 - i) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q i, q (1 - i) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg
p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Bool⊢ (if
↑(match p ((fun i => i) ⟨0, ⋯⟩), p (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨0, ⋯⟩), q (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨0, ⋯⟩), p (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨0, ⋯⟩), q (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨0, ⋯⟩), p (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨0, ⋯⟩), q (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨0, ⋯⟩), p (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨0, ⋯⟩), q (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Bool⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Bool⊢ (if
↑(match p ((fun i => i) ⟨0, ⋯⟩), p (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨0, ⋯⟩), q (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨0, ⋯⟩), p (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨0, ⋯⟩), q (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨0, ⋯⟩), p (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨0, ⋯⟩), q (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨0, ⋯⟩), p (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨0, ⋯⟩), q (1 - (fun i => i) ⟨0, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Bool⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg (
p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = falseh2:q 0 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = falseh2:q 0 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = trueh2:q 0 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = trueh2:q 0 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = falseh2:q 0 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = falseh2:q 0 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = trueh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = trueh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg p:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = falseh2:q 0 = falseh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = falseh2:q 0 = falseh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = falseh2:q 0 = trueh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = falseh2:q 0 = trueh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = trueh2:q 0 = falseh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = trueh2:q 0 = falseh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = trueh2:q 0 = trueh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = falseh1:p 1 = trueh2:q 0 = trueh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = falseh2:q 0 = falseh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = falseh2:q 0 = falseh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = falseh2:q 0 = trueh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = falseh2:q 0 = trueh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = falseh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = falseh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = trueh3:q 1 = false⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.negp:PureProfile (Fin 2) fun x => Boolq:PureProfile (Fin 2) fun x => Boolh0:p 0 = trueh1:p 1 = trueh2:q 0 = trueh3:q 1 = true⊢ (if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 0
| false, false => 1
| true, true => 2
| false, true => 3) then
Sign.zero
else Sign.neg) =
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) >
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.pos
else
if
↑(match p ((fun i => i) ⟨1, ⋯⟩), p (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) =
↑(match q ((fun i => i) ⟨1, ⋯⟩), q (1 - (fun i => i) ⟨1, ⋯⟩) with
| true, false => 10
| false, false => 20
| true, true => 30
| false, true => 40) then
Sign.zero
else Sign.neg
All goals completed! 🐙)
-- Matching Pennies via ranking: P0 wants to match, P1 wants to differ
def mp' := game2x2_rank
(fun me opp => match me, opp with -- P0 wants to match
| true, true => 1
| false, false => 1
| _, _ => 0)
(fun me opp => match me, opp with -- P1 wants to differ
| true, false => 1
| false, true => 1
| _, _ => 0)
theorem mp'_no_pureNash :
∀ p, ¬mp'.IsPureNash p := ⊢ ∀ (p : PureProfile (Fin 2) fun x => Bool), ¬mp'.IsPureNash p
intro p p:PureProfile (Fin 2) fun x => Boolhp:mp'.IsPureNash p⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:mp'.IsPureNash ph0t:(mp'.signAction 0 p (p 0) true).nonneg := hp 0 true⊢ False; p:PureProfile (Fin 2) fun x => Boolhp:mp'.IsPureNash ph0t:(mp'.signAction 0 p (p 0) true).nonneg := hp 0 trueh0f:(mp'.signAction 0 p (p 0) false).nonneg := hp 0 false⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:mp'.IsPureNash ph0t:(mp'.signAction 0 p (p 0) true).nonneg := hp 0 trueh0f:(mp'.signAction 0 p (p 0) false).nonneg := hp 0 falseh1t:(mp'.signAction 1 p (p 1) true).nonneg := hp 1 true⊢ False; p:PureProfile (Fin 2) fun x => Boolhp:mp'.IsPureNash ph0t:(mp'.signAction 0 p (p 0) true).nonneg := hp 0 trueh0f:(mp'.signAction 0 p (p 0) false).nonneg := hp 0 falseh1t:(mp'.signAction 1 p (p 1) true).nonneg := hp 1 trueh1f:(mp'.signAction 1 p (p 1) false).nonneg := hp 1 false⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => False⊢ False
p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = trueh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = trueh1:p 1 = true⊢ False p:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = falseh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = falseh1:p 1 = true⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = trueh1:p 1 = false⊢ Falsep:PureProfile (Fin 2) fun x => Boolhp:∀ (i : Fin 2) (v : Bool),
match
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ p i else p 0, if h : 1 = i then ⋯ ▸ p i else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ p i else p 1, if h : 0 = i then ⋯ ▸ p i else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑i = 0 then
↑(match if h : 0 = i then ⋯ ▸ v else p 0, if h : 1 = i then ⋯ ▸ v else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = i then ⋯ ▸ v else p 1, if h : 0 = i then ⋯ ▸ v else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0t:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then true else p 0, if h : 1 = 0 then ⋯ ▸ true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ true else p 1, if h : True then true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0f:match
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑0 = 0 then
↑(match if h : True then p 0 else p 0, if h : 1 = 0 then ⋯ ▸ p 0 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ p 0 else p 1, if h : True then p 0 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑0 = 0 then
↑(match if h : True then false else p 0, if h : 1 = 0 then ⋯ ▸ false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : 1 = 0 then ⋯ ▸ false else p 1, if h : True then false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1t:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ true else p 0, if h : True then true else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then true else p 1, if h : 0 = 1 then ⋯ ▸ true else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh1f:match
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) >
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.pos
else
if
(if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ p 1 else p 0, if h : True then p 1 else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then p 1 else p 1, if h : 0 = 1 then ⋯ ▸ p 1 else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0)) =
if ↑1 = 0 then
↑(match if h : 0 = 1 then ⋯ ▸ false else p 0, if h : True then false else p 1 with
| true, true => 1
| false, false => 1
| x, x_1 => 0)
else
↑(match if h : True then false else p 1, if h : 0 = 1 then ⋯ ▸ false else p 0 with
| true, false => 1
| false, true => 1
| x, x_1 => 0) then
Sign.zero
else Sign.neg with
| Sign.pos => True
| Sign.zero => True
| Sign.neg => Falseh0:p 0 = trueh1:p 1 = true⊢ False All goals completed! 🐙
Unlike nash_exists, which is a pure existence theorem, findNash is a def
returning a concrete Nash profile. It runs the descent algorithm as a terminating
program, so we can #eval it to see the equilibrium.
Prisoner's Dilemma has a unique pure Nash equilibrium at (D, D). Running the
descent from the fully mixed profile {C, D}² converges there:
#eval (pd.findNash.1 0).1 -- {false} (D for player 0)
#eval (pd.findNash.1 1).1 -- {false} (D for player 1)
Matching Pennies has no pure Nash equilibrium, but the fully mixed profile is an ordinal Nash equilibrium — no proper subface strictly dominates the full face. The descent recognises this immediately and returns the starting profile:
#eval (mp.findNash.1 0).1 -- {false, true}
#eval (mp.findNash.1 1).1 -- {false, true}
The descent finds the unique pure Nash of the Prisoner's Dilemma. Since the
whole algorithm is computable, decide discharges the claim by running it.
theorem pd_findNash_is_DD :
(pd.findNash.1 0).1 = {false} ∧ (pd.findNash.1 1).1 = {false} := ⊢ ↑(↑pd.findNash 0) = {false} ∧ ↑(↑pd.findNash 1) = {false}
All goals completed! 🐙The descent leaves Matching Pennies at the fully mixed profile — the ordinal Nash equilibrium.
theorem mp_findNash_is_full :
(mp.findNash.1 0).1 = {false, true} ∧ (mp.findNash.1 1).1 = {false, true} := ⊢ ↑(↑mp.findNash 0) = {false, true} ∧ ↑(↑mp.findNash 1) = {false, true}
All goals completed! 🐙
end Base