Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit b560d40

Browse files
committed
feat(data/sum/basic): sum.lift_rel is a subrelation of sum.lex (#15358)
Also trivial spacing fix.
1 parent 7929a63 commit b560d40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/data/sum/basic.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,16 @@ instance [decidable_rel r] [decidable_rel s] : decidable_rel (lex r s)
286286
protected lemma lift_rel.lex {a b : α ⊕ β} (h : lift_rel r s a b) : lex r s a b :=
287287
by { cases h, exacts [lex.inl ‹_›, lex.inr ‹_›] }
288288

289+
lemma lift_rel_subrelation_lex : subrelation (lift_rel r s) (lex r s) := λ a b, lift_rel.lex
290+
289291
lemma lex.mono (hr : ∀ a b, r₁ a b → r₂ a b) (hs : ∀ a b, s₁ a b → s₂ a b) (h : lex r₁ s₁ x y) :
290292
lex r₂ s₂ x y :=
291293
by { cases h, exacts [lex.inl (hr _ _ ‹_›), lex.inr (hs _ _ ‹_›), lex.sep _ _] }
292294

293295
lemma lex.mono_left (hr : ∀ a b, r₁ a b → r₂ a b) (h : lex r₁ s x y) : lex r₂ s x y :=
294296
h.mono hr $ λ _ _, id
295297

296-
lemma lex.mono_right (hs : ∀ a b, s₁ a b → s₂ a b) (h : lex r s₁ x y) : lex r s₂ x y :=
298+
lemma lex.mono_right (hs : ∀ a b, s₁ a b → s₂ a b) (h : lex r s₁ x y) : lex r s₂ x y :=
297299
h.mono (λ _ _, id) hs
298300

299301
lemma lex_acc_inl {a} (aca : acc r a) : acc (lex r s) (inl a) :=

0 commit comments

Comments
 (0)