Theorems
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f. f =
(rep1 --> abs2) (RES_ABSTRACT (respects R1) ((abs1 --> rep2) f))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 f g.
(R1 ===> R2) f g ⇒ (R1 ===> R2) f (RES_ABSTRACT (respects R1) g)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒ ∀f x. f x = abs2 ((abs1 --> rep2) f (rep1 x))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f g x y. (R1 ===> R2) f g ∧ R1 x y ⇒ R2 (f x) (g y)
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒
∀a b c. (if a then b else c) = abs (if a then rep b else rep c)
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒
∀a1 a2 b1 b2 c1 c2.
(a1 ⇔ a2) ∧ R b1 b2 ∧ R c1 c2 ⇒
R (if a1 then b1 else c1) (if a2 then b2 else c2)
⊢ ∀P P' Q Q'. (P ⇒ Q) ∧ (P' ⇒ Q') ⇒ P ∧ P' ⇒ Q ∧ Q'
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀R3 abs3 rep3.
QUOTIENT R3 abs3 rep3 ⇒
∀f x y.
flip f x y =
abs3 (flip ((abs1 --> abs2 --> rep3) f) (rep2 x) (rep1 y))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀R3 abs3 rep3.
QUOTIENT R3 abs3 rep3 ⇒
∀f1 f2 x1 x2 y1 y2.
(R1 ===> R2 ===> R3) f1 f2 ∧ R2 x1 x2 ∧ R1 y1 y2 ⇒
R3 (flip f1 x1 y1) (flip f2 x2 y2)
⊢ ∀P P' Q Q'. (P ⇒ Q) ∧ (P' ⇒ Q') ⇒ P ∨ P' ⇒ Q ∨ Q'
⊢ ∀R. EQUIV R ⇒ R a1 a2 ∧ R b1 b2 ⇒ a1 = b1 ⇒ R a2 b2
⊢ ∀P P' Q Q'. P = Q ∧ P' = Q' ⇒ P = P' ⇒ Q = Q'
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀x y. x = y ⇔ R (rep x) (rep y)
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒
∀x1 x2 y1 y2. R x1 x2 ∧ R y1 y2 ⇒ (R x1 y1 ⇔ R x2 y2)
⊢ ∀R. EQUIV R ⇒ PARTIAL_EQUIV R
⊢ ∀R. (∀x y. R x y ⇔ R x = R y) ⇔
(∀x. R x x) ∧ (∀x y. R x y ⇒ R y x) ∧ ∀x y z. R x y ∧ R y z ⇒ R x z
⊢ ∀R1 R2 f1 f2 x1 x2.
R2 (f1 x1) (f2 x2) ∧ R1 x1 x1 ⇒
R2 (RES_ABSTRACT (respects R1) f1 x1) (f2 x2)
⊢ ∀R1 R2 f1 f2 x1 x2.
R2 (f1 x1) (f2 x2) ∧ R1 x2 x2 ⇒
R2 (f1 x1) (RES_ABSTRACT (respects R1) f2 x2)
⊢ ∀E P. EQUIV E ⇒ (RES_EXISTS (respects E) P ⇔ $? P)
⊢ ∀E P. EQUIV E ⇒ (RES_EXISTS_UNIQUE (respects E) P ⇔ $?! P)
⊢ ∀E P. EQUIV E ⇒ (RES_FORALL (respects E) P ⇔ $! P)
⊢ ∀t1 t2. (t1 ⇔ t2) ⇒ t1 ⇒ t2
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒ ∀f. $? f ⇔ RES_EXISTS (respects R) ((abs --> I) f)
⊢ ∀P Q. (∀x. P x ⇒ Q x) ⇒ $? P ⇒ $? Q
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒ ∀f. $?! f ⇔ RES_EXISTS_EQUIV R ((abs --> I) f)
⊢ ∀P E Q.
(∀x. P x ⇒ respects E x ∧ Q x) ∧
(∀x y. respects E x ∧ Q x ∧ respects E y ∧ Q y ⇒ E x y) ⇒
$?! P ⇒
RES_EXISTS_EQUIV E Q
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒ ∀f. $! f ⇔ RES_FORALL (respects R) ((abs --> I) f)
⊢ ∀P Q. (∀x. P x ⇒ Q x) ⇒ $! P ⇒ $! Q
⊢ ∀f g h x. (f --> g) h x = g (h (f x))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
QUOTIENT (R1 ===> R2) (rep1 --> abs2) (abs1 --> rep2)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f g.
respects (R1 ===> R2) f ∧ respects (R1 ===> R2) g ⇒
((rep1 --> abs2) f = (rep1 --> abs2) g ⇔
∀x y. R1 x y ⇒ R2 (f x) (g y))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f g.
(R1 ===> R2) f g ⇔
respects (R1 ===> R2) f ∧ respects (R1 ===> R2) g ∧
(rep1 --> abs2) f = (rep1 --> abs2) g
⊢ ∀R1 R2 f g x y. (R1 ===> R2) f g ∧ R1 x y ⇒ R2 (f x) (g y)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f g x y. (R1 ===> R2) f g ∧ R1 x y ⇒ R2 (f x) (g y)
⊢ ∀P P' Q Q'. (Q ⇒ P) ∧ (P' ⇒ Q') ⇒ (P ⇒ P') ⇒ Q ⇒ Q'
⊢ ∀f g s x. x ∈ (f --> g) s ⇔ g (f x ∈ s)
⊢ ∀R x. x ∈ respects R ⇔ R x x
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀e. I e = abs (I (rep e))
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀e1 e2. R e1 e2 ⇒ R (I e1) (I e2)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒ ∀x y. K x y = abs1 (K (rep1 x) (rep2 y))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀x1 x2 y1 y2. R1 x1 x2 ∧ R2 y1 y2 ⇒ R1 (K x1 y1) (K x2 y2)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f. (λx. f x) = (rep1 --> abs2) (λx. rep2 (f (abs1 x)))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f. (λx. f x) = (rep1 --> abs2) (λx. (abs1 --> rep2) f x)
⊢ ∀REL1 abs1 rep1 REL2 abs2 rep2 f1 f2.
((∀r r'. REL1 r r' ⇒ REL1 r (rep1 (abs1 r'))) ∧
∀r r'. REL2 r r' ⇒ REL2 r (rep2 (abs2 r'))) ∧ (REL1 ===> REL2) f1 f2 ⇒
(REL1 ===> REL2) f1 ((abs1 --> rep2) ((rep1 --> abs2) f2))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f1 f2. (R1 ===> R2) f1 f2 ⇒ (R1 ===> R2) (λx. f1 x) (λy. f2 y)
⊢ ∀P R Q. (∀x. R x ⇒ Q x ⇒ P x) ⇒ RES_EXISTS R Q ⇒ $? P
⊢ ∀P R Q. (∀x. R x ∧ (Q x ⇒ P x)) ⇒ RES_FORALL R Q ⇒ $! P
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f x. LET f x = abs2 (LET ((abs1 --> rep2) f) (rep1 x))
⊢ ∀r lam v. v ∈ r ⇒ LET (RES_ABSTRACT r lam) v = LET lam v
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f g x y. (R1 ===> R2) f g ∧ R1 x y ⇒ R2 (LET f x) (LET g y)
⊢ ∀P Q. (Q ⇒ P) ⇒ ¬P ⇒ ¬Q
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f g.
respects (R1 ===> R2) f ∧ respects (R1 ===> R2) g ∧
(rep1 --> abs2) f = (rep1 --> abs2) g ⇒
∀x y. R1 x y ⇒ R2 (f x) (g y)
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀a. abs (rep a) = a
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒ ∀r s. R r s ⇔ R r r ∧ R s s ∧ abs r = abs s
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀r s. R r s ⇒ abs r = abs s
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒ ∀r s. R r r ⇒ R s s ⇒ (R r s ⇔ abs r = abs s)
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀a b. R (rep a) (rep b) ⇔ a = b
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀r. R r r ⇒ R (rep (abs r)) r
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀a. R (rep a) (rep a)
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀x y. R x y ⇒ R y x
⊢ ∀R abs rep. QUOTIENT R abs rep ⇒ ∀x y z. R x y ∧ R y z ⇒ R x z
⊢ ∀REL abs rep.
QUOTIENT REL abs rep ⇒ ∀x1 x2. REL x1 x2 ⇒ REL x1 (rep (abs x2))
⊢ ∀R x. respects R x ⇔ R x x
⊢ ∀R1 R2 f x y. respects (R1 ===> R2) f ∧ R1 x y ⇒ R2 (f x) (f y)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 f x.
respects (R1 ===> R2) f ∧ R1 x x ⇒ R2 (f (rep1 (abs1 x))) (f x)
⊢ ∀R1 R2 f. respects (R1 ===> R2) f ⇔ ∀x y. R1 x y ⇒ R2 (f x) (f y)
⊢ ∀R1 R2 R3 f g.
respects (R2 ===> R3) f ∧ respects (R1 ===> R2) g ⇒
respects (R1 ===> R3) (f ∘ g)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 f g.
(R1 ===> R2) f g ⇒ (R1 ===> R2) (RES_ABSTRACT (respects R1) f) g
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f1 f2.
(R1 ===> R2) f1 f2 ⇒
(R1 ===> R2) (RES_ABSTRACT (respects R1) f1)
(RES_ABSTRACT (respects R1) f2)
⊢ ∀R m.
RES_EXISTS_EQUIV R m ⇔
(∃x::respects R. m x) ∧ ∀x y::respects R. m x ∧ m y ⇒ R x y
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒
∀f g. (R ===> $<=>) f g ⇒ (RES_EXISTS_EQUIV R f ⇔ RES_EXISTS_EQUIV R g)
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒
∀P f. RES_EXISTS P f ⇔ RES_EXISTS ((abs --> I) P) ((abs --> I) f)
⊢ ∀P Q R. (∀x. R x ⇒ P x ⇒ Q x) ⇒ RES_EXISTS R P ⇒ RES_EXISTS R Q
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒
∀f g.
(R ===> $<=>) f g ⇒
(RES_EXISTS (respects R) f ⇔ RES_EXISTS (respects R) g)
⊢ ∀P R Q.
(∀x. P x ⇒ Q x) ∧
(∀x y. respects R x ∧ Q x ∧ respects R y ∧ Q y ⇒ R x y) ⇒
RES_EXISTS_UNIQUE (respects R) P ⇒
RES_EXISTS_EQUIV R Q
⊢ ∀R P Q.
(R ===> $<=>) P Q ⇒
RES_EXISTS_UNIQUE (respects R) P ⇒
RES_EXISTS_EQUIV R Q
⊢ ∀R P. RES_EXISTS_UNIQUE (respects R) P ⇒ RES_EXISTS_EQUIV R P
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒
∀P f. RES_FORALL P f ⇔ RES_FORALL ((abs --> I) P) ((abs --> I) f)
⊢ ∀P Q R. (∀x. R x ⇒ P x ⇒ Q x) ⇒ RES_FORALL R P ⇒ RES_FORALL R Q
⊢ ∀R abs rep.
QUOTIENT R abs rep ⇒
∀f g.
(R ===> $<=>) f g ⇒
(RES_FORALL (respects R) f ⇔ RES_FORALL (respects R) g)
⊢ ∀P R Q. (∀x. R x ∧ (P x ⇒ Q x)) ⇒ $? P ⇒ RES_EXISTS R Q
⊢ ∀P R Q. (∀x. R x ⇒ P x ⇒ Q x) ⇒ $! P ⇒ RES_FORALL R Q
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f x. W f x = abs2 (W ((abs1 --> abs1 --> rep2) f) (rep1 x))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f1 f2 x1 x2.
(R1 ===> R1 ===> R2) f1 f2 ∧ R1 x1 x2 ⇒ R2 (W f1 x1) (W f2 x2)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f x.
literal_case f x = abs2 (literal_case ((abs1 --> rep2) f) (rep1 x))
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀f g x y.
(R1 ===> R2) f g ∧ R1 x y ⇒
R2 (literal_case f x) (literal_case g y)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀R3 abs3 rep3.
QUOTIENT R3 abs3 rep3 ⇒
∀f g.
f ∘ g = (rep1 --> abs3) ((abs2 --> rep3) f ∘ (abs1 --> rep2) g)
⊢ ∀R1 abs1 rep1.
QUOTIENT R1 abs1 rep1 ⇒
∀R2 abs2 rep2.
QUOTIENT R2 abs2 rep2 ⇒
∀R3 abs3 rep3.
QUOTIENT R3 abs3 rep3 ⇒
∀f1 f2 g1 g2.
(R2 ===> R3) f1 f2 ∧ (R1 ===> R2) g1 g2 ⇒
(R1 ===> R3) (f1 ∘ g1) (f2 ∘ g2)