Skip to content

Commit c45abd0

Browse files
authored
Add type.eqv_of_is_not_higher_order (mit-plv#127)
1 parent bf64674 commit c45abd0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/Rewriter/Language/Language.v

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ Module Compilers.
166166

167167
Notation is_not_higher_order := (@is_not_higher_order_than 1).
168168

169+
Lemma eqv_of_is_not_higher_order {base_type base_interp t}
170+
(H : is_not_higher_order t = true)
171+
: forall v, Proper (@related base_type base_interp (fun _ => eq) t) v.
172+
Proof.
173+
cbv [Proper]; induction t; cbn; eauto; try apply HR; repeat intro; cbn in *.
174+
cbv [is_base Proper] in *; break_innermost_match_hyps; cbn in *; subst; try congruence; eauto.
175+
Qed.
176+
169177
Section interpM.
170178
Context {base_type} (M : Type -> Type) (base_interp : base_type -> Type).
171179
(** half-monadic denotation function; denote [type]s into their

0 commit comments

Comments
 (0)