Skip to content

Commit

Permalink
chore: fix lift_fun -> liftFun in lemma names (#4873)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Jun 9, 2023
1 parent 3b8ea35 commit 8dbcc1d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions Mathlib/Data/Fin/Basic.lean
Expand Up @@ -1865,7 +1865,7 @@ theorem addCases_right {m n : ℕ} {C : Fin (m + n) → Sort _} (hleft : ∀ i,

end Rec

theorem lift_fun_iff_succ {α : Type _} (r : α → α → Prop) [IsTrans α r] {f : Fin (n + 1) → α} :
theorem liftFun_iff_succ {α : Type _} (r : α → α → Prop) [IsTrans α r] {f : Fin (n + 1) → α} :
((· < ·) ⇒ r) f f ↔ ∀ i : Fin n, r (f (castSucc i)) (f i.succ) := by
constructor
· intro H i
Expand All @@ -1876,32 +1876,32 @@ theorem lift_fun_iff_succ {α : Type _} (r : α → α → Prop) [IsTrans α r]
rw [← le_castSucc_iff] at hij
rcases hij.eq_or_lt with (rfl | hlt)
exacts[H j, _root_.trans (ihj hlt) (H j)]
#align fin.lift_fun_iff_succ Fin.lift_fun_iff_succ
#align fin.lift_fun_iff_succ Fin.liftFun_iff_succ

/-- A function `f` on `Fin (n + 1)` is strictly monotone if and only if `f i < f (i + 1)`
for all `i`. -/
theorem strictMono_iff_lt_succ {α : Type _} [Preorder α] {f : Fin (n + 1) → α} :
StrictMono f ↔ ∀ i : Fin n, f (castSucc i) < f i.succ :=
lift_fun_iff_succ (· < ·)
liftFun_iff_succ (· < ·)
#align fin.strict_mono_iff_lt_succ Fin.strictMono_iff_lt_succ

/-- A function `f` on `Fin (n + 1)` is monotone if and only if `f i ≤ f (i + 1)` for all `i`. -/
theorem monotone_iff_le_succ {α : Type _} [Preorder α] {f : Fin (n + 1) → α} :
Monotone f ↔ ∀ i : Fin n, f (castSucc i) ≤ f i.succ :=
monotone_iff_forall_lt.trans <| lift_fun_iff_succ (· ≤ ·)
monotone_iff_forall_lt.trans <| liftFun_iff_succ (· ≤ ·)
#align fin.monotone_iff_le_succ Fin.monotone_iff_le_succ

/-- A function `f` on `Fin (n + 1)` is strictly antitone if and only if `f (i + 1) < f i`
for all `i`. -/
theorem strictAnti_iff_succ_lt {α : Type _} [Preorder α] {f : Fin (n + 1) → α} :
StrictAnti f ↔ ∀ i : Fin n, f i.succ < f (castSucc i) :=
lift_fun_iff_succ (· > ·)
liftFun_iff_succ (· > ·)
#align fin.strict_anti_iff_succ_lt Fin.strictAnti_iff_succ_lt

/-- A function `f` on `Fin (n + 1)` is antitone if and only if `f (i + 1) ≤ f i` for all `i`. -/
theorem antitone_iff_succ_le {α : Type _} [Preorder α] {f : Fin (n + 1) → α} :
Antitone f ↔ ∀ i : Fin n, f i.succ ≤ f (castSucc i) :=
antitone_iff_forall_lt.trans <| lift_fun_iff_succ (· ≥ ·)
antitone_iff_forall_lt.trans <| liftFun_iff_succ (· ≥ ·)
#align fin.antitone_iff_succ_le Fin.antitone_iff_succ_le

section AddGroup
Expand Down
12 changes: 6 additions & 6 deletions Mathlib/Data/Fin/Tuple/Monotone.lean
Expand Up @@ -21,22 +21,22 @@ open Set Fin Matrix Function

variable {α : Type _}

theorem lift_fun_vecCons {n : ℕ} (r : α → α → Prop) [IsTrans α r] {f : Fin (n + 1) → α} {a : α} :
theorem liftFun_vecCons {n : ℕ} (r : α → α → Prop) [IsTrans α r] {f : Fin (n + 1) → α} {a : α} :
((· < ·) ⇒ r) (vecCons a f) (vecCons a f) ↔ r a (f 0) ∧ ((· < ·) ⇒ r) f f := by
simp only [lift_fun_iff_succ r, forall_fin_succ, cons_val_succ, cons_val_zero, ← succ_castSucc,
simp only [liftFun_iff_succ r, forall_fin_succ, cons_val_succ, cons_val_zero, ← succ_castSucc,
castSucc_zero]
#align lift_fun_vec_cons lift_fun_vecCons
#align lift_fun_vec_cons liftFun_vecCons

variable [Preorder α] {n : ℕ} {f : Fin (n + 1) → α} {a : α}

@[simp]
theorem strictMono_vecCons : StrictMono (vecCons a f) ↔ a < f 0 ∧ StrictMono f :=
lift_fun_vecCons (· < ·)
liftFun_vecCons (· < ·)
#align strict_mono_vec_cons strictMono_vecCons

@[simp]
theorem monotone_vecCons : Monotone (vecCons a f) ↔ a ≤ f 0 ∧ Monotone f := by
simpa only [monotone_iff_forall_lt] using @lift_fun_vecCons α n (· ≤ ·) _ f a
simpa only [monotone_iff_forall_lt] using @liftFun_vecCons α n (· ≤ ·) _ f a
#align monotone_vec_cons monotone_vecCons

--Porting note: new lemma, in Lean3 would be proven by `Subsingleton.monotone`
Expand All @@ -51,7 +51,7 @@ theorem strictMono_vecEmpty : StrictMono (vecCons a vecEmpty)

@[simp]
theorem strictAnti_vecCons : StrictAnti (vecCons a f) ↔ f 0 < a ∧ StrictAnti f :=
lift_fun_vecCons (· > ·)
liftFun_vecCons (· > ·)
#align strict_anti_vec_cons strictAnti_vecCons

@[simp]
Expand Down
10 changes: 5 additions & 5 deletions Mathlib/Order/Antisymmetrization.lean
Expand Up @@ -207,7 +207,7 @@ theorem ofAntisymmetrization_lt_ofAntisymmetrization_iff {a b : Antisymmetrizati
theorem toAntisymmetrization_mono : Monotone (@toAntisymmetrization α (· ≤ ·) _) := fun _ _ => id
#align to_antisymmetrization_mono toAntisymmetrization_mono

private theorem lift_fun_antisymmRel (f : α →o β) :
private theorem liftFun_antisymmRel (f : α →o β) :
((AntisymmRel.setoid α (· ≤ ·)).r ⇒ (AntisymmRel.setoid β (· ≤ ·)).r) f f := fun _ _ h =>
⟨f.mono h.1, f.mono h.2

Expand All @@ -216,26 +216,26 @@ private theorem lift_fun_antisymmRel (f : α →o β) :
-/
protected def OrderHom.antisymmetrization (f : α →o β) :
Antisymmetrization α (· ≤ ·) →o Antisymmetrization β (· ≤ ·) :=
⟨Quotient.map' f <| lift_fun_antisymmRel f, fun a b => Quotient.inductionOn₂' a b <| f.mono⟩
⟨Quotient.map' f <| liftFun_antisymmRel f, fun a b => Quotient.inductionOn₂' a b <| f.mono⟩
#align order_hom.antisymmetrization OrderHom.antisymmetrization

@[simp]
theorem OrderHom.coe_antisymmetrization (f : α →o β) :
⇑f.antisymmetrization = Quotient.map' f (lift_fun_antisymmRel f) :=
⇑f.antisymmetrization = Quotient.map' f (liftFun_antisymmRel f) :=
rfl
#align order_hom.coe_antisymmetrization OrderHom.coe_antisymmetrization

/- Porting notes: Removed @[simp] attribute. With this `simp` lemma the LHS of
`OrderHom.antisymmetrization_apply_mk` is not in normal-form -/
theorem OrderHom.antisymmetrization_apply (f : α →o β) (a : Antisymmetrization α (· ≤ ·)) :
f.antisymmetrization a = Quotient.map' f (lift_fun_antisymmRel f) a :=
f.antisymmetrization a = Quotient.map' f (liftFun_antisymmRel f) a :=
rfl
#align order_hom.antisymmetrization_apply OrderHom.antisymmetrization_apply

@[simp]
theorem OrderHom.antisymmetrization_apply_mk (f : α →o β) (a : α) :
f.antisymmetrization (toAntisymmetrization _ a) = toAntisymmetrization _ (f a) :=
@Quotient.map_mk _ _ (_root_.id _) (_root_.id _) f (lift_fun_antisymmRel f) _
@Quotient.map_mk _ _ (_root_.id _) (_root_.id _) f (liftFun_antisymmRel f) _
#align order_hom.antisymmetrization_apply_mk OrderHom.antisymmetrization_apply_mk

variable (α)
Expand Down

0 comments on commit 8dbcc1d

Please sign in to comment.