Skip to content

Commit 012336b

Browse files
committed
chore(QPF/Multivariate/Basic): use strict implicit binder in liftR_iff (#23880)
This matches mathlib3 and fixes a comment in the file (which was made before Lean 4 got strict implicit binders). The analogous lemma `liftP_iff` uses a strict implicit binder. The stray comment was pointed out by the linter in #22760. Co-authored-by: grunweg <rothgami@math.hu-berlin.de>
1 parent b672298 commit 012336b

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Mathlib/Control/Functor/Multivariate.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def LiftP {α : TypeVec n} (P : ∀ i, α i → Prop) (x : F α) : Prop :=
4343
∃ u : F (fun i => Subtype (P i)), (fun i => @Subtype.val _ (P i)) <$$> u = x
4444

4545
/-- relational lifting over multivariate functors -/
46-
def LiftR {α : TypeVec n} (R : ∀ {i}, α i → α i → Prop) (x y : F α) : Prop :=
46+
def LiftR {α : TypeVec n} (R : ∀ ⦃i⦄, α i → α i → Prop) (x y : F α) : Prop :=
4747
∃ u : F (fun i => { p : α i × α i // R p.fst p.snd }),
4848
(fun i (t : { p : α i × α i // R p.fst p.snd }) => t.val.fst) <$$> u = x ∧
4949
(fun i (t : { p : α i × α i // R p.fst p.snd }) => t.val.snd) <$$> u = y
@@ -200,7 +200,7 @@ private def g' :
200200
| _, _, Fin2.fz, x => ⟨x.val, x.property⟩
201201

202202
theorem LiftR_RelLast_iff (x y : F (α ::: β)) :
203-
LiftR' (RelLast' _ rr) x y ↔ LiftR (RelLast (i := _) _ rr) x y := by
203+
LiftR' (RelLast' _ rr) x y ↔ LiftR (RelLast _ rr) x y := by
204204
dsimp only [LiftR, LiftR']
205205
apply exists_iff_exists_of_mono F (f' rr _ _) (g' rr _ _)
206206
· ext i ⟨x, _⟩ : 2

Mathlib/Data/QPF/Multivariate/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
130130
use abs ⟨a, fun i j => ⟨f i j, h₁ i j⟩⟩
131131
rw [← abs_map, h₀]; rfl
132132

133-
theorem liftR_iff {α : TypeVec n} (r : ∀ /- ⦃i⦄ -/ {i}, α i → α i → Prop) (x y : F α) :
133+
theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : F α) :
134134
LiftR r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by
135135
constructor
136136
· rintro ⟨u, xeq, yeq⟩

Mathlib/Data/QPF/Multivariate/Constructions/Cofix.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ theorem Cofix.bisim_rel {α : TypeVec n} (r : Cofix F α → Cofix F α → Prop
258258

259259
/-- Bisimulation principle using `LiftR` to match and relate children of two trees. -/
260260
theorem Cofix.bisim {α : TypeVec n} (r : Cofix F α → Cofix F α → Prop)
261-
(h : ∀ x y, r x y → LiftR (RelLast α r (i := _)) (Cofix.dest x) (Cofix.dest y)) :
261+
(h : ∀ x y, r x y → LiftR (RelLast α r) (Cofix.dest x) (Cofix.dest y)) :
262262
∀ x y, r x y → x = y := by
263263
apply Cofix.bisim_rel
264264
intro x y rxy
265-
rcases (liftR_iff (fun a b => RelLast α r a b) (dest x) (dest y)).mp (h x y rxy)
265+
rcases (liftR_iff (fun a b => RelLast α r b) (dest x) (dest y)).mp (h x y rxy)
266266
with ⟨a, f₀, f₁, dxeq, dyeq, h'⟩
267267
rw [dxeq, dyeq, ← abs_map, ← abs_map, MvPFunctor.map_eq, MvPFunctor.map_eq]
268268
rw [← split_dropFun_lastFun f₀, ← split_dropFun_lastFun f₁]

0 commit comments

Comments
 (0)