Set Phi to be the term
λX' op ⇒ (∀x y z ∈ X', op (op x y) z = op x (op y z)) ∧ (∃e ∈ X', ∀x ∈ X', op x e = x ∧ op e x = x) of type
set → (set → set → set) → prop.
We prove the intermediate
claim LPhi1:
∀X, ∀F : set → set → set, (∀x y ∈ X, F x y ∈ X) → ∀F' : set → set → set, (∀x y ∈ X, F x y = F' x y) → Phi X F' = Phi X F.
Assume H.
Apply H to the current goal.
Let Y be given.
Assume H.
Apply H to the current goal.
Let uniqa be given.
Apply H1 to the current goal.
Assume HY: Obj Y.
Apply HY to the current goal.
Assume HYs.
Apply HYs to the current goal.
Let V and q be given.
Assume Hq.
rewrite the current goal using
unpack_b_o_eq Phi V q (LPhi1 V q Hq) (from left to right).
Assume HVq: Phi V q.
We prove the intermediate
claim L2SNo:
∀x ∈ 2, SNo x.
Let x be given.
Assume Hx.
We prove the intermediate claim L1: Obj M2.
We prove the intermediate
claim L1a:
∀x y ∈ 2, x * y ∈ 2.
Let x be given.
Assume Hx.
Let y be given.
Assume Hy.
We prove the intermediate
claim Ly:
SNo y.
An exact proof term for the current goal is L2SNo y Hy.
Apply cases_2 x Hx to the current goal.
rewrite the current goal using
mul_SNo_zeroL y Ly (from left to right).
An
exact proof term for the current goal is
In_0_2.
rewrite the current goal using
mul_SNo_oneL y Ly (from left to right).
An exact proof term for the current goal is Hy.
Apply andI to the current goal.
An exact proof term for the current goal is L1a.
Apply andI to the current goal.
Let x be given.
Assume Hx.
Let y be given.
Assume Hy.
Let z be given.
Assume Hz.
We will
prove (x * y) * z = x * (y * z).
Use symmetry.
An
exact proof term for the current goal is
mul_SNo_assoc x y z (L2SNo x Hx) (L2SNo y Hy) (L2SNo z Hz).
We use
1 to
witness the existential quantifier.
Apply andI to the current goal.
An
exact proof term for the current goal is
In_1_2.
Let x be given.
Assume Hx.
We prove the intermediate
claim Lx:
SNo x.
An exact proof term for the current goal is L2SNo x Hx.
Apply andI to the current goal.
An
exact proof term for the current goal is
mul_SNo_oneR x Lx.
An
exact proof term for the current goal is
mul_SNo_oneL x Lx.
Apply H2 M2 L1 to the current goal.
Assume H.
Apply H to the current goal.
Set f to be the term
λx ∈ V ⇒ 0.
Set g to be the term
λx ∈ V ⇒ 1.
We prove the intermediate
claim L2:
Hom (pack_b V q) M2 f.
Apply andI to the current goal.
We will
prove (λx ∈ V ⇒ 0) ∈ ∏x ∈ V, 2.
Apply lam_Pi to the current goal.
Let x be given.
Assume Hx.
An
exact proof term for the current goal is
In_0_2.
We will
prove ∀x y ∈ V, f (q x y) = f x * f y.
Let x be given.
Assume Hx.
Let y be given.
Assume Hy.
rewrite the current goal using
beta V (λ_ ⇒ 0) (q x y) (Hq x Hx y Hy) (from left to right).
rewrite the current goal using
beta V (λ_ ⇒ 0) x Hx (from left to right).
rewrite the current goal using
beta V (λ_ ⇒ 0) y Hy (from left to right).
Use symmetry.
We prove the intermediate
claim L3:
Hom (pack_b V q) M2 g.
Apply andI to the current goal.
We will
prove (λx ∈ V ⇒ 1) ∈ ∏x ∈ V, 2.
Apply lam_Pi to the current goal.
Let x be given.
Assume Hx.
An
exact proof term for the current goal is
In_1_2.
We will
prove ∀x y ∈ V, g (q x y) = g x * g y.
Let x be given.
Assume Hx.
Let y be given.
Assume Hy.
rewrite the current goal using
beta V (λ_ ⇒ 1) (q x y) (Hq x Hx y Hy) (from left to right).
rewrite the current goal using
beta V (λ_ ⇒ 1) x Hx (from left to right).
rewrite the current goal using
beta V (λ_ ⇒ 1) y Hy (from left to right).
Use symmetry.
Apply HVq to the current goal.
Assume H.
Apply H to the current goal.
Let e be given.
Assume H.
Apply H to the current goal.
Assume _.
Use transitivity with f e, uniqa M2 e, and g e.
Use symmetry.
An
exact proof term for the current goal is
beta V (λ_ ⇒ 0) e He.
We will
prove f e = uniqa M2 e.
Use f_equal.
An exact proof term for the current goal is H4 f L2.
We will
prove uniqa M2 e = g e.
Use f_equal.
Use symmetry.
An exact proof term for the current goal is H4 g L3.
An
exact proof term for the current goal is
beta V (λ_ ⇒ 1) e He.
∎