Let X, Y, CX, CY and f be given.
Set Phi to be the term λX CX Y CY ⇒ f YX(∀U : setprop, (∀y, U yy Y)CY UCX (λx ⇒ x XU (f x))) of type set((setprop)prop)set((setprop)prop)prop.
Set PhiX to be the term λX CX ⇒ unpack_c_o (pack_c Y CY) (λY' CY ⇒ Phi X CX Y' CY) of type set((setprop)prop)prop.
We will prove unpack_c_o (pack_c X CX) PhiX = Phi X CX Y CY.
We prove the intermediate claim L1: ∀CX : (setprop)prop, ∀CY' : (setprop)prop, (∀U : setprop, (∀y, U yy Y)(CY UCY' U))Phi X CX Y CY' = Phi X CX Y CY.
Let CX be given.
Let CY' be given.
Assume HCY'.
Apply prop_ext_2 to the current goal.
Assume H.
Apply H to the current goal.
Assume H1 H2.
We will prove f YX(∀U : setprop, (∀y, U yy Y)CY UCX (λx ⇒ x XU (f x))).
Apply andI to the current goal.
An exact proof term for the current goal is H1.
Let U be given.
Assume HU1 HU2.
We will prove CX (λx ⇒ x XU (f x)).
Apply H2 to the current goal.
An exact proof term for the current goal is HU1.
We will prove CY' U.
An exact proof term for the current goal is iffEL (CY U) (CY' U) (HCY' U HU1) HU2.
Assume H.
Apply H to the current goal.
Assume H1 H2.
We will prove f YX(∀U : setprop, (∀y, U yy Y)CY' UCX (λx ⇒ x XU (f x))).
Apply andI to the current goal.
An exact proof term for the current goal is H1.
Let U be given.
Assume HU1 HU2.
We will prove CX (λx ⇒ x XU (f x)).
Apply H2 to the current goal.
An exact proof term for the current goal is HU1.
We will prove CY U.
An exact proof term for the current goal is iffER (CY U) (CY' U) (HCY' U HU1) HU2.
We prove the intermediate claim L2: ∀CX' : (setprop)prop, (∀U : setprop, (∀x, U xx X)(CX UCX' U))PhiX X CX' = PhiX X CX.
Let CX' be given.
Assume HCX'.
We will prove PhiX X CX' = PhiX X CX.
We will prove unpack_c_o (pack_c Y CY) (λY' CY ⇒ Phi X CX' Y' CY) = unpack_c_o (pack_c Y CY) (λY' CY ⇒ Phi X CX Y' CY).
Use transitivity with Phi X CX' Y CY, and Phi X CX Y CY.
We will prove unpack_c_o (pack_c Y CY) (Phi X CX') = Phi X CX' Y CY.
An exact proof term for the current goal is unpack_c_o_eq (Phi X CX') Y CY (L1 CX').
We will prove Phi X CX' Y CY = Phi X CX Y CY.
Apply prop_ext_2 to the current goal.
Assume H.
Apply H to the current goal.
Assume H1: f YX.
Assume H2: ∀U : setprop, (∀y, U yy Y)CY UCX' (λx ⇒ x XU (f x)).
We will prove f YX(∀U : setprop, (∀y, U yy Y)CY UCX (λx ⇒ x XU (f x))).
Apply andI to the current goal.
An exact proof term for the current goal is H1.
Let U be given.
Assume HU1: ∀y, U yy Y.
Assume HU2: CY U.
We prove the intermediate claim LU: ∀x, x XU (f x)x X.
Let x be given.
An exact proof term for the current goal is andEL (x X) (U (f x)).
Apply iffER (CX (λx ⇒ x XU (f x))) (CX' (λx ⇒ x XU (f x))) (HCX' (λx ⇒ x XU (f x)) LU) to the current goal.
An exact proof term for the current goal is H2 U HU1 HU2.
Assume H.
Apply H to the current goal.
Assume H1 H2.
We will prove f YX(∀U : setprop, (∀y, U yy Y)CY UCX' (λx ⇒ x XU (f x))).
Apply andI to the current goal.
An exact proof term for the current goal is H1.
Let U be given.
Assume HU1: ∀y, U yy Y.
Assume HU2: CY U.
We prove the intermediate claim LU: ∀x, x XU (f x)x X.
Let x be given.
An exact proof term for the current goal is andEL (x X) (U (f x)).
Apply iffEL (CX (λx ⇒ x XU (f x))) (CX' (λx ⇒ x XU (f x))) (HCX' (λx ⇒ x XU (f x)) LU) to the current goal.
An exact proof term for the current goal is H2 U HU1 HU2.
Use symmetry.
An exact proof term for the current goal is unpack_c_o_eq (Phi X CX) Y CY (L1 CX).
Use transitivity with and PhiX X CX.
An exact proof term for the current goal is unpack_c_o_eq PhiX X CX L2.
We will prove unpack_c_o (pack_c Y CY) (Phi X CX) = Phi X CX Y CY.
An exact proof term for the current goal is unpack_c_o_eq (Phi X CX) Y CY (L1 CX).