Skip to content

Commit

Permalink
Add type.eqv_of_is_not_higher_order (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross authored Dec 3, 2023
1 parent bf64674 commit c45abd0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Rewriter/Language/Language.v
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ Module Compilers.

Notation is_not_higher_order := (@is_not_higher_order_than 1).

Lemma eqv_of_is_not_higher_order {base_type base_interp t}
(H : is_not_higher_order t = true)
: forall v, Proper (@related base_type base_interp (fun _ => eq) t) v.
Proof.
cbv [Proper]; induction t; cbn; eauto; try apply HR; repeat intro; cbn in *.
cbv [is_base Proper] in *; break_innermost_match_hyps; cbn in *; subst; try congruence; eauto.
Qed.

Section interpM.
Context {base_type} (M : Type -> Type) (base_interp : base_type -> Type).
(** half-monadic denotation function; denote [type]s into their
Expand Down

0 comments on commit c45abd0

Please sign in to comment.