整列順序

Require Import function.
Require Import power.
Require Import relation.
From Stdlib Require Import Logic.Description.
From Stdlib Require Import Logic.FunctionalExtensionality.

Set Implicit Arguments.

HoTT Bookの10章に従う。

Section WellOrder.
  Variable X : Type.
  Variable R : bin_rel X.

  Inductive accessible (a : X) : Prop :=
    | acc : (forall b, R b a -> accessible b) -> accessible a.

  
accessible_ind : forall P : X -> Prop, (forall a : X, (forall b : X, R b a -> accessible b) -> (forall b : X, R b a -> P b) -> P a) -> forall a : X, accessible a -> P a
accessible_rect : forall P : X -> Type, (forall a : X, (forall b : X, R b a -> accessible b) -> (forall b : X, R b a -> P b) -> P a) -> forall a : X, accessible a -> P a
Definition well_founded : Prop := forall a, accessible a. Definition extensional : Prop := forall a b, (forall c, R c a <-> R c b) -> a = b. Definition transitive : Prop := forall a b c, R a b -> R b c -> R a c. Definition is_well_order : Prop := well_founded /\ extensional /\ transitive. End WellOrder. Record well_order (X : Type) : Type := make_well_order { R :> bin_rel X; R_is_well_order :> is_well_order R; }. Definition well_ordered_type : Type := { X : Type & well_order X }. Definition proj_well_ordered_type (X : well_ordered_type) : Type := projT1 X.
proj_well_ordered_type is now a coercion
Definition initial_segment (X : Type) (R : well_order X) (x : X) : power X := fun y => R y x. Section Simulation. Variables (X : Type) (Y : Type). Definition is_simulation (P : well_order X) (Q : well_order Y) (f : X -> Y) : Prop := forall x : X, image f (initial_segment P x) = initial_segment Q (f x). Definition monotone (P : bin_rel X) (Q : bin_rel Y) (f : X -> Y) : Prop := forall x x' : X, P x x' -> Q (f x) (f x').
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> monotone P Q f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> monotone P Q f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> forall x x' : X, P x x' -> Q (f x) (f x')
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x, x': X
H0: P x x'

Q (f x) (f x')
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x': X
H: image f (initial_segment P x') = initial_segment Q (f x')
x: X
H0: P x x'

Q (f x) (f x')
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x', x: X
H: image f (initial_segment P x') (f x) = initial_segment Q (f x') (f x)
H0: P x x'

Q (f x) (f x')
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x', x: X
H: (exists a : X, P a x' /\ f a = f x) = Q (f x) (f x')
H0: P x x'

Q (f x) (f x')
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x', x: X
H: (exists a : X, P a x' /\ f a = f x) = Q (f x) (f x')
H0: P x x'

exists a : X, P a x' /\ f a = f x
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x', x: X
H: (exists a : X, P a x' /\ f a = f x) = Q (f x) (f x')
H0: P x x'

P x x' /\ f x = f x
split; [exact H0 | reflexivity]. Qed.
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f <-> monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f <-> monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f

monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)
is_simulation P Q f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f

monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f

monotone P Q f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f

monotone P Q f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f

is_simulation P Q f
assumption.
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f

forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)

exists x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x: X
H: image f (initial_segment P x) = initial_segment Q (f x)
y: Y
H0: Q y (f x)

exists x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x: X
H: image f (fun y : X => P y x) = (fun y : Y => Q y (f x))
y: Y
H0: Q y (f x)

exists x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x: X
y: Y
H: image f (fun y : X => P y x) y = Q y (f x)
H0: Q y (f x)

exists x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x: X
y: Y
H: image f (fun y : X => P y x) y = Q y (f x)
H0: image f (fun y : X => P y x) y

exists x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
x: X
y: Y
H: image f (fun y : X => P y x) y = Q y (f x)
H0: exists a : X, P a x /\ f a = y

exists x' : X, P x' x /\ f x' = y
assumption.
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)

is_simulation P Q f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y

is_simulation P Q f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y

forall x : X, image f (initial_segment P x) = initial_segment Q (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X

image f (initial_segment P x) = initial_segment Q (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X

image f (initial_segment P x) ⊆ initial_segment Q (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X
initial_segment Q (f x) ⊆ image f (initial_segment P x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X

image f (initial_segment P x) ⊆ initial_segment Q (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X
y: Y
H1: y ∈ image f (initial_segment P x)

y ∈ initial_segment Q (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X
y: Y
H1: y ∈ image f (initial_segment P x)

Q y (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X
y: Y
H1: exists a : X, P a x /\ f a = y

Q y (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X
y: Y
x0: X
H1: P x0 x
H2: f x0 = y

Q y (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x, x0: X
H1: P x0 x

Q (f x0) (f x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x, x0: X
H1: P x0 x

P x0 x
assumption.
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X

initial_segment Q (f x) ⊆ image f (initial_segment P x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X
y: Y
H1: y ∈ initial_segment Q (f x)

y ∈ image f (initial_segment P x)
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X
y: Y
H1: y ∈ initial_segment Q (f x)

exists a : X, P a x /\ f a = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
x: X
y: Y
H1: Q y (f x)

exists a : X, P a x /\ f a = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: monotone P Q f
x: X
y: Y
H0: exists x' : X, P x' x /\ f x' = y
H1: Q y (f x)

exists a : X, P a x /\ f a = y
assumption. Qed.

Simulationは単射である。

  
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> injective f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> injective f
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X

forall a' : X, f x = f a' -> x = a'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: is_simulation {| R := P; R_is_well_order := conj H1 (conj H2 H3) |} Q f
x: X

forall a' : X, f x = f a' -> x = a'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: is_simulation {| R := P; R_is_well_order := conj H1 (conj H2 H3) |} Q f
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'

forall a' : X, f a = f a' -> a = a'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: is_simulation {| R := P; R_is_well_order := conj H1 (conj H2 H3) |} Q f
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'

a = x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: is_simulation {| R := P; R_is_well_order := conj H1 (conj H2 H3) |} Q f
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'

forall c : X, P c a <-> P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: is_simulation {| R := P; R_is_well_order := conj H1 (conj H2 H3) |} Q f
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
c: X

P c a <-> P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: monotone {| R := P; R_is_well_order := conj H1 (conj H2 H3) |} Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, {| R := P; R_is_well_order := conj H1 (conj H2 H3) |} x' x /\ f x' = y)
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
c: X

P c a <-> P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
c: X

P c a <-> P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: monotone P Q f
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
c: X

P c a <-> P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: monotone P Q f
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
c: X
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: monotone P Q f
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
c: X
H7: P c x'
P c a
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: monotone P Q f
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
c: X
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
a, c: X
H: Q (f c) (f a)
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
a, c, x': X
H: Q (f c) (f x')
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
a, c, x': X
H: Q (f c) (f x')
H6: exists x'0 : X, P x'0 x' /\ f x'0 = f c
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
a, c, x': X
H: Q (f c) (f x')
x: X
H6: P x x'
H8: f x = f c
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
a, c, x', x: X
H: Q (f x) (f x')
H6: P x x'
H8: f x = f c
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
a, c, x', x: X
H: Q (f x) (f x')
H6: P x x'
H8: f c = f x
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
a, c, x', x: X
H: Q (f x) (f x')
H6: P x x'
H8: f c = f x
H0: forall b : X, P b a -> accessible P b
H4: c = x
H5: f a = f x'
H7: P c a

P c x'
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
a, c, x': X
H8: f c = f c
H6: P c x'
H: Q (f c) (f x')
H0: forall b : X, P b a -> accessible P b
H5: f a = f x'
H7: P c a

P c x'
exact H6.
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
H: monotone P Q f
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
x': X
H5: f a = f x'
c: X
H7: P c x'

P c a
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
x', c: X
H: Q (f c) (f x')
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
a: X
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c x'

P c a
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
x', c, a: X
H: Q (f c) (f a)
H6: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c x'

P c a
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
x', c, a: X
H: Q (f c) (f a)
H6: exists x' : X, P x' a /\ f x' = f c
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c x'

P c a
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
x', c, a: X
H: Q (f c) (f a)
x: X
H8: P x a
H10: f x = f c
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c x'

P c a
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
x', c, a, x: X
H: Q (f x) (f a)
H8: P x a
H10: f x = f c
H0: forall b : X, P b a -> accessible P b
H4: forall b : X, P b a -> forall a' : X, f b = f a' -> b = a'
H5: f a = f x'
H7: P c x'

P c a
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
x', c, a, x: X
H: Q (f x) (f a)
H8: P x a
H10: f x = f c
H0: forall b : X, P b a -> accessible P b
H4: x = c
H5: f a = f x'
H7: P c x'

P c a
X, Y: Type
P: bin_rel X
H1: well_founded P
H2: extensional P
H3: transitive P
Q: well_order Y
f: X -> Y
x', c, a: X
H10: f c = f c
H8: P c a
H: Q (f c) (f a)
H0: forall b : X, P b a -> accessible P b
H5: f a = f x'
H7: P c x'

P c a
exact H8. Qed.
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> forall (x : X) (y : Y), Q y (f x) -> exists ! x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> forall (x : X) (y : Y), Q y (f x) -> exists ! x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)

exists ! x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
H': monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)

exists ! x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
H': forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y

exists ! x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
H': exists x' : X, P x' x /\ f x' = y

exists ! x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x /\ f x0 = y

exists ! x' : X, P x' x /\ f x' = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x /\ f x0 = y

unique (fun x' : X => P x' x /\ f x' = y) x0
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x /\ f x0 = y

(P x0 x /\ f x0 = y) /\ (forall x' : X, P x' x /\ f x' = y -> x0 = x')
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x /\ f x0 = y

P x0 x /\ f x0 = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x /\ f x0 = y
forall x' : X, P x' x /\ f x' = y -> x0 = x'
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x /\ f x0 = y

P x0 x /\ f x0 = y
assumption.
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x /\ f x0 = y

forall x' : X, P x' x /\ f x' = y -> x0 = x'
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x /\ f x0 = y
x': X
H2: P x' x /\ f x' = y

x0 = x'
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
x0: X
H1: P x0 x
H3: f x0 = y
x': X
H2: P x' x
H4: f x' = y

x0 = x'
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x, x0: X
H0: Q (f x0) (f x)
H1: P x0 x
x': X
H2: P x' x
H4: f x' = f x0

x0 = x'
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x, x0: X
H0: Q (f x0) (f x)
H1: P x0 x
x': X
H2: P x' x
H4: f x' = f x0

x' = x0
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x, x0: X
H0: Q (f x0) (f x)
H1: P x0 x
x': X
H2: P x' x
H4: f x' = f x0

f x' = f x0
assumption. Qed.
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> forall (x : X) (y : Y), Q y (f x) -> X
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y

is_simulation P Q f -> forall (x : X) (y : Y), Q y (f x) -> X
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)

X
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
H1: {x0 : X | (fun x' : X => P x' x /\ f x' = y) x0}

X
exact (proj1_sig H1). Defined.
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f

forall (x : X) (y : Y) (H0 : Q y (f x)), P (simulation_helper_data H x y H0) x /\ f (simulation_helper_data H x y H0) = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f

forall (x : X) (y : Y) (H0 : Q y (f x)), P (simulation_helper_data H x y H0) x /\ f (simulation_helper_data H x y H0) = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)

P (simulation_helper_data H x y H0) x /\ f (simulation_helper_data H x y H0) = y
X, Y: Type
P: well_order X
Q: well_order Y
f: X -> Y
H: is_simulation P Q f
x: X
y: Y
H0: Q y (f x)
H1:= constructive_definite_description (fun x' : X => P x' x /\ f x' = y) (simulation_helper_unique H x y H0): {x0 : X | (fun x' : X => P x' x /\ f x' = y) x0}

P (simulation_helper_data H x y H0) x /\ f (simulation_helper_data H x y H0) = y
exact (proj2_sig H1). Qed.
X, Y: Type
P: well_order X
Q: well_order Y
f, g: X -> Y
H0: is_simulation P Q f
H1: is_simulation P Q g

f = g
X, Y: Type
P: well_order X
Q: well_order Y
f, g: X -> Y
H0: is_simulation P Q f
H1: is_simulation P Q g

f = g
X, Y: Type
P: well_order X
Q: well_order Y
f, g: X -> Y
H0: is_simulation P Q f
H1: is_simulation P Q g
x: X

f x = g x
X, Y: Type
P: well_order X
Q: well_order Y
f, g: X -> Y
H0: monotone P Q f /\ (forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y)
H1: monotone P Q g /\ (forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y)
x: X

f x = g x
X, Y: Type
P: well_order X
Q: well_order Y
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
x: X

f x = g x
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: well_order Y
f, g: X -> Y
H: monotone {| R := P; R_is_well_order := conj H3 (conj H4 H5) |} Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, {| R := P; R_is_well_order := conj H3 (conj H4 H5) |} x' x /\ f x' = y
H1: monotone {| R := P; R_is_well_order := conj H3 (conj H4 H5) |} Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, {| R := P; R_is_well_order := conj H3 (conj H4 H5) |} x' x /\ g x' = y
x: X

f x = g x
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone {| R := P; R_is_well_order := conj H3 (conj H4 H5) |} {| R := Q; R_is_well_order := conj H6 (conj H7 H8) |} f
H0: forall (x : X) (y : Y), {| R := Q; R_is_well_order := conj H6 (conj H7 H8) |} y (f x) -> exists x' : X, {| R := P; R_is_well_order := conj H3 (conj H4 H5) |} x' x /\ f x' = y
H1: monotone {| R := P; R_is_well_order := conj H3 (conj H4 H5) |} {| R := Q; R_is_well_order := conj H6 (conj H7 H8) |} g
H2: forall (x : X) (y : Y), {| R := Q; R_is_well_order := conj H6 (conj H7 H8) |} y (g x) -> exists x' : X, {| R := P; R_is_well_order := conj H3 (conj H4 H5) |} x' x /\ g x' = y
x: X

f x = g x
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
x: X

f x = g x
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
a: X
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b

f a = g a
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
a: X
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b

forall c : Y, Q c (f a) <-> Q c (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
a: X
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
c: Y

Q c (f a) <-> Q c (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
a: X
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
c: Y
H11: Q c (f a)

Q c (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
a: X
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
c: Y
H11: Q c (g a)
Q c (f a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
a: X
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
c: Y
H11: Q c (f a)

Q c (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
a: X
c: Y
H0: exists x' : X, P x' a /\ f x' = c
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
H11: Q c (f a)

Q c (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
a: X
c: Y
x: X
Pxa: P x a
e: f x = c
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
H11: Q c (f a)

Q c (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
a, x: X
Pxa: P x a
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
H11: Q (f x) (f a)

Q (f x) (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
a, x: X
Pxa: P x a
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
H9: forall b : X, P b a -> accessible P b
H10: f x = g x
H11: Q (f x) (f a)

Q (f x) (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
a, x: X
Pxa: P x a
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
H9: forall b : X, P b a -> accessible P b
H10: f x = g x
H11: Q (f x) (f a)

Q (g x) (g a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
a, x: X
Pxa: P x a
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
H9: forall b : X, P b a -> accessible P b
H10: f x = g x
H11: Q (f x) (f a)

P x a
assumption.
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
H2: forall (x : X) (y : Y), Q y (g x) -> exists x' : X, P x' x /\ g x' = y
a: X
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
c: Y
H11: Q c (g a)

Q c (f a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
a: X
c: Y
H2: exists x' : X, P x' a /\ g x' = c
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
H11: Q c (g a)

Q c (f a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
a: X
c: Y
x: X
Pxa: P x a
e: g x = c
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
H11: Q c (g a)

Q c (f a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
a, x: X
Pxa: P x a
H9: forall b : X, P b a -> accessible P b
H10: forall b : X, P b a -> f b = g b
H11: Q (g x) (g a)

Q (g x) (f a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
a, x: X
Pxa: P x a
H9: forall b : X, P b a -> accessible P b
H10: f x = g x
H11: Q (g x) (g a)

Q (g x) (f a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
a, x: X
Pxa: P x a
H9: forall b : X, P b a -> accessible P b
H10: f x = g x
H11: Q (g x) (g a)

Q (f x) (f a)
X, Y: Type
P: bin_rel X
H3: well_founded P
H4: extensional P
H5: transitive P
Q: bin_rel Y
H6: well_founded Q
H7: extensional Q
H8: transitive Q
f, g: X -> Y
H: monotone P Q f
H0: forall (x : X) (y : Y), Q y (f x) -> exists x' : X, P x' x /\ f x' = y
H1: monotone P Q g
a, x: X
Pxa: P x a
H9: forall b : X, P b a -> accessible P b
H10: f x = g x
H11: Q (g x) (g a)

P x a
assumption. Qed. End Simulation. Definition simulation (X Y : well_ordered_type) : Type := {f : X -> Y & is_simulation (projT2 X) (projT2 Y) f}. Definition hartogs_type (X : Type) : Type := {S : power X & well_order (sig S)}. Definition hartogs_helper (X : Type) : hartogs_type X -> well_ordered_type := fun S => existT _ (sig (projT1 S)) (projT2 S). Definition hartogs_order (X : Type) : bin_rel (hartogs_type X) := fun S T => inhabited (simulation (hartogs_helper S) (hartogs_helper T)).