Skip to content

Commit

Permalink
Add a coercion from ON to Wf
Browse files Browse the repository at this point in the history
  • Loading branch information
Casteran committed Jan 23, 2024
1 parent 51bf7cf commit 14bf0de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
7 changes: 3 additions & 4 deletions theories/ordinals/Hydra/Hydra_Termination.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Set Program Cases.

From hydras Require Export Hydra_Lemmas.
From hydras Require Import E0 Hessenberg.
Import ON_Generic.

(** *** Converting any hydra into an ordinal less than
#epsilon0# $\epsilon_0$
Expand Down Expand Up @@ -194,8 +195,7 @@ Qed.
#[ global, program ] Instance var (h:Hydra) : E0:= @mkord (m h) _.
Next Obligation. apply m_nf. Defined.


#[global] Instance HVariant_0 : @Hvariant _ _ T1_wf free m.
#[global] Instance HVariant_0 : Hvariant T1_wf free m.
Proof.
split; intros; eapply round_decr; eauto.
Qed.
Expand All @@ -204,8 +204,7 @@ Qed.
(* begin snippet FinalThm *)

(*| .. coq:: no-out |*)

#[global] Instance HVariant : Hvariant E0lt_wf free var.
#[global] Instance HVariant : Hvariant Epsilon0 free var.
Proof.
split; intros; eapply round_decr; eauto.
Qed.
Expand Down
2 changes: 1 addition & 1 deletion theories/ordinals/Hydra/Omega2_Small.v
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Section Impossibility_Proof.

Variable m : Hydra -> ON_Omega2.t.
Context
(Hvar: Hvariant (ON_Generic.ON_wf (ON:=Omega2)) free m).
(Hvar: Hvariant Omega2 free m).

(* end snippet Impossibilitya *)

Expand Down
10 changes: 4 additions & 6 deletions theories/ordinals/Hydra/Omega_Small.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@


From Coq Require Import Arith Lia.
From hydras Require Import Hydra_Lemmas.
From hydras Require Import Hydra_Lemmas ON_Generic ON_Omega.
Open Scope nat_scope.



#[ global ] Instance height_var : @Hvariant _ _ lt_wf free height.
#[global] Instance height_var : Hvariant Omega free height.
Proof.
split;intros.
(*
Expand All @@ -28,7 +26,7 @@ Proof.
Abort.
(* end show *)

Lemma height_bad : ~ @Hvariant _ _ lt_wf free height.
Lemma height_bad : ~ Hvariant Omega free height.
Proof.
intros [H];
specialize (H 1 (hyd1 (hyd2 head head)) (hyd1 (hyd1 head)));
Expand All @@ -51,7 +49,7 @@ Section Impossibility_Proof.
for proving the termination of all hydra battles *)

Variable m : Hydra -> nat.
Context (Hvar : @Hvariant _ _ lt_wf free m).
Context (Hvar : Hvariant lt_wf free m).

(* end snippet omegaSmalla *)

Expand Down
4 changes: 3 additions & 1 deletion theories/ordinals/OrdinalNotations/ON_Generic.v
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ Delimit Scope ON_scope with on.
Class ON {A:Type} (lt: relation A) (cmp: Compare A) :=
{
ON_comp :> Comparable lt cmp;
ON_wf : well_founded lt;
ON_wf :> well_founded lt;
}.
#[global] Existing Instance ON_comp.
Coercion ON_wf : ON >-> well_founded.

(* end snippet ONDef *)

(* begin snippet ONDefsa:: no-out *)
Expand Down

0 comments on commit 14bf0de

Please sign in to comment.