tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.Limits.pullbackDiagonalMapIdIso_inv_snd_snd
File: Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean

tactic: rw [Iso.inv_comp_eq]
state_before: C : Type u_2
inst✝⁵ : Category C
X Y Z : C
inst✝⁴ : HasPullbacks C
S T : C
f : X ⟶ T
g : Y ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f g
inst✝¹ : HasPullback (f ≫ i) (g ≫ i)
inst✝ :
  HasPullback (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))
⊢ (pullbackDiagonalMapIdIso f g i).inv ≫ snd ≫ snd = snd

tactic: simp
state_before: C : Type u_2
inst✝⁵ : Category C
X Y Z : C
inst✝⁴ : HasPullbacks C
S T : C
f : X ⟶ T
g : Y ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f g
inst✝¹ : HasPullback (f ≫ i) (g ≫ i)
inst✝ :
  HasPullback (diagonal i) (map (f ≫ i) (g ≫ i) i i f g (𝟙 S) (_ : (f ≫ i) ≫ 𝟙 S = f ≫ i) (_ : (g ≫ i) ≫ 𝟙 S = g ≫ i))
⊢ snd ≫ snd = (pullbackDiagonalMapIdIso f g i).hom ≫ snd
Theorem: CategoryTheory.Functor.map_hom_inv
File: Mathlib/CategoryTheory/Iso.lean

tactic: simp
state_before: C : Type u
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝ : IsIso f
⊢ F.map f ≫ F.map (inv f) = 𝟙 (F.obj X)
Theorem: List.duplicate_cons_iff_of_ne
File: Mathlib/Data/List/Duplicate.lean

tactic: simp [duplicate_cons_iff, hne.symm]
state_before: α : Type u_1
l : List α
x y : α
hne : x ≠ y
⊢ x ∈+ y :: l ↔ x ∈+ l
Theorem: Multiset.ndinter_eq_zero_iff_disjoint
File: Mathlib/Data/Multiset/FinsetOps.lean

tactic: rw [← subset_zero]
state_before: α : Type u_1
inst✝ : DecidableEq α
s✝ s t : Multiset α
⊢ ndinter s t = 0 ↔ Disjoint s t

tactic: simp [subset_iff, Disjoint]
state_before: α : Type u_1
inst✝ : DecidableEq α
s✝ s t : Multiset α
⊢ ndinter s t ⊆ 0 ↔ Disjoint s t
Theorem: Ordnode.insert.valid
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [insert_eq_insertWith]
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
t : Ordnode α
h : Valid t
⊢ Valid (Ordnode.insert x t)

tactic: exact insertWith.valid _ _ (fun _ _ => ⟨le_rfl, le_rfl⟩) h
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
t : Ordnode α
h : Valid t
⊢ Valid (insertWith (fun x_1 => x) x t)
Theorem: CircleDeg1Lift.translationNumber_lt_of_forall_lt_add
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: obtain ⟨x, -, hx⟩ : ∃ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, f y - y ≤ f x - x :=
  isCompact_Icc.exists_forall_ge (nonempty_Icc.2 zero_le_one)
    (hf.sub continuous_id).continuousOn
state_before: f g : CircleDeg1Lift
hf : Continuous ↑f
z : ℝ
hz : ∀ (x : ℝ), ↑f x < x + z
⊢ τ f < z

tactic: refine' lt_of_le_of_lt _ (sub_lt_iff_lt_add'.2 <| hz x)
state_before: case intro.intro
f g : CircleDeg1Lift
hf : Continuous ↑f
z : ℝ
hz : ∀ (x : ℝ), ↑f x < x + z
x : ℝ
hx : ∀ (y : ℝ), y ∈ Icc 0 1 → ↑f y - y ≤ ↑f x - x
⊢ τ f < z

tactic: apply translationNumber_le_of_le_add
state_before: case intro.intro
f g : CircleDeg1Lift
hf : Continuous ↑f
z : ℝ
hz : ∀ (x : ℝ), ↑f x < x + z
x : ℝ
hx : ∀ (y : ℝ), y ∈ Icc 0 1 → ↑f y - y ≤ ↑f x - x
⊢ τ f ≤ ↑f x - x

tactic: simp only [← sub_le_iff_le_add']
state_before: case intro.intro.hz
f g : CircleDeg1Lift
hf : Continuous ↑f
z : ℝ
hz : ∀ (x : ℝ), ↑f x < x + z
x : ℝ
hx : ∀ (y : ℝ), y ∈ Icc 0 1 → ↑f y - y ≤ ↑f x - x
⊢ ∀ (x_1 : ℝ), ↑f x_1 ≤ x_1 + (↑f x - x)

tactic: exact f.forall_map_sub_of_Icc (fun a => a ≤ f x - x) hx
state_before: case intro.intro.hz
f g : CircleDeg1Lift
hf : Continuous ↑f
z : ℝ
hz : ∀ (x : ℝ), ↑f x < x + z
x : ℝ
hx : ∀ (y : ℝ), y ∈ Icc 0 1 → ↑f y - y ≤ ↑f x - x
⊢ ∀ (x_1 : ℝ), ↑f x_1 - x_1 ≤ ↑f x - x
Theorem: MeasureTheory.SimpleFunc.restrict_mono
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: simp only [coe_restrict _ hs, indicator_le_indicator (H x)]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.817681
δ : Type ?u.817684
inst✝² : MeasurableSpace α
K : Type ?u.817690
inst✝¹ : Zero β
inst✝ : Preorder β
s : Set α
f g : α →ₛ β
H : f ≤ g
hs : MeasurableSet s
x : α
⊢ ↑(restrict f s) x ≤ ↑(restrict g s) x

tactic: simp only [restrict_of_not_measurable hs, le_refl]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.817681
δ : Type ?u.817684
inst✝² : MeasurableSpace α
K : Type ?u.817690
inst✝¹ : Zero β
inst✝ : Preorder β
s : Set α
f g : α →ₛ β
H : f ≤ g
hs : ¬MeasurableSet s
⊢ restrict f s ≤ restrict g s
Theorem: Nat.ArithmeticFunction.LSeriesSummable_zero
File: Mathlib/NumberTheory/LSeries.lean

tactic: simp [LSeriesSummable, summable_zero]
state_before: z : ℂ
⊢ LSeriesSummable 0 z
Theorem: Real.floor_logb_nat_cast
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: obtain rfl | hr := hr.eq_or_lt
state_before: b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr : 0 ≤ r
⊢ ⌊logb (↑b) r⌋ = Int.log b r

tactic: have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
state_before: case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
⊢ ⌊logb (↑b) r⌋ = Int.log b r

tactic: apply le_antisymm
state_before: case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌊logb (↑b) r⌋ = Int.log b r

tactic: rw [logb_zero, Int.log_zero_right, Int.floor_zero]
state_before: case inl
b✝ x y : ℝ
b : ℕ
hb : 1 < b
hr : 0 ≤ 0
⊢ ⌊logb (↑b) 0⌋ = Int.log b 0

tactic: rw [← Int.zpow_le_iff_le_log hb hr, ← rpow_int_cast b]
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌊logb (↑b) r⌋ ≤ Int.log b r

tactic: refine' le_of_le_of_eq _ (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr)
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ r

tactic: exact rpow_le_rpow_of_exponent_le hb1'.le (Int.floor_le _)
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ ↑b ^ logb (↑b) r

tactic: rw [Int.le_floor, le_logb_iff_rpow_le hb1' hr, rpow_int_cast]
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ Int.log b r ≤ ⌊logb (↑b) r⌋

tactic: exact Int.zpow_log_le_self hb hr
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ Int.log b r ≤ r
Theorem: Int.natAbs_div_le_natAbs
File: Std/Data/Int/DivMod.lean

tactic: rw [Int.ediv_neg, natAbs_neg]
state_before: a b : Int
n : Nat
⊢ natAbs (a / -↑n) ≤ natAbs a

tactic: apply aux
state_before: a b : Int
n : Nat
⊢ natAbs (a / ↑n) ≤ natAbs a
Theorem: Nat.card_fintypeIoo
File: Mathlib/Data/Nat/Interval.lean

tactic: rw [Fintype.card_ofFinset, card_Ioo]
state_before: a b c : ℕ
⊢ Fintype.card ↑(Set.Ioo a b) = b - a - 1
Theorem: Filter.tendsto_iff_ultrafilter
File: Mathlib/Order/Filter/Ultrafilter.lean

tactic: simpa only [tendsto_iff_comap] using le_iff_ultrafilter
state_before: α : Type u
β : Type v
γ : Type ?u.52285
f✝ : Filter α
s : Set α
a : α
f : α → β
l₁ : Filter α
l₂ : Filter β
⊢ Tendsto f l₁ l₂ ↔ ∀ (g : Ultrafilter α), ↑g ≤ l₁ → Tendsto f (↑g) l₂
Theorem: Quiver.SingleObj.toPrefunctor_symm_comp
File: Mathlib/Combinatorics/Quiver/SingleObj.lean

tactic: simp only [Equiv.symm_apply_eq, toPrefunctor_comp, Equiv.apply_symm_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : SingleObj α ⥤q SingleObj β
g : SingleObj β ⥤q SingleObj γ
⊢ ↑toPrefunctor.symm (f ⋙q g) = ↑toPrefunctor.symm g ∘ ↑toPrefunctor.symm f
Theorem: Composition.mem_range_embedding_iff'
File: Mathlib/Combinatorics/Composition.lean

tactic: constructor
state_before: n : ℕ
c : Composition n
j : Fin n
i : Fin (length c)
⊢ j ∈ Set.range ↑(embedding c i) ↔ i = index c j

tactic: rw [← not_imp_not]
state_before: case mp
n : ℕ
c : Composition n
j : Fin n
i : Fin (length c)
⊢ j ∈ Set.range ↑(embedding c i) → i = index c j

tactic: intro h
state_before: case mp
n : ℕ
c : Composition n
j : Fin n
i : Fin (length c)
⊢ ¬i = index c j → ¬j ∈ Set.range ↑(embedding c i)

tactic: exact Set.disjoint_right.1 (c.disjoint_range h) (c.mem_range_embedding j)
state_before: case mp
n : ℕ
c : Composition n
j : Fin n
i : Fin (length c)
h : ¬i = index c j
⊢ ¬j ∈ Set.range ↑(embedding c i)

tactic: intro h
state_before: case mpr
n : ℕ
c : Composition n
j : Fin n
i : Fin (length c)
⊢ i = index c j → j ∈ Set.range ↑(embedding c i)

tactic: rw [h]
state_before: case mpr
n : ℕ
c : Composition n
j : Fin n
i : Fin (length c)
h : i = index c j
⊢ j ∈ Set.range ↑(embedding c i)

tactic: exact c.mem_range_embedding j
state_before: case mpr
n : ℕ
c : Composition n
j : Fin n
i : Fin (length c)
h : i = index c j
⊢ j ∈ Set.range ↑(embedding c (index c j))
Theorem: Cubic.map_toPoly
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: simp only [map, toPoly, map_C, map_X, Polynomial.map_add, Polynomial.map_mul, Polynomial.map_pow]
state_before: R : Type u_2
S : Type u_1
F : Type ?u.679043
K : Type ?u.679046
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝¹ : Semiring R
inst✝ : Semiring S
φ : R →+* S
⊢ toPoly (map φ P) = Polynomial.map φ (toPoly P)
Theorem: Real.log_pos_iff
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: rw [← log_one]
state_before: x y : ℝ
hx : 0 < x
⊢ 0 < log x ↔ 1 < x

tactic: exact log_lt_log_iff zero_lt_one hx
state_before: x y : ℝ
hx : 0 < x
⊢ log 1 < log x ↔ 1 < x
Theorem: NoTopOrder.to_noMaxOrder
File: Mathlib/Order/Max.lean

tactic: simpa [not_le] using exists_not_le a
state_before: α✝ : Type ?u.5028
β : Type ?u.5031
α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : NoTopOrder α
a : α
⊢ ∃ b, a < b
Theorem: QuaternionAlgebra.Basis.k_mul_j
File: Mathlib/Algebra/QuaternionBasis.lean

tactic: rw [← i_mul_j, mul_assoc, j_mul_j, mul_smul_comm, mul_one]
state_before: R : Type u_2
A : Type u_1
B : Type ?u.27887
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
⊢ q.k * q.j = c₂ • q.i
Theorem: geom_sum_eq_zero_iff_neg_one
File: Mathlib/Algebra/GeomSum.lean

tactic: refine' ⟨fun h => _, @fun ⟨h, hn⟩ => by simp only [h, hn, neg_one_geom_sum, if_true]⟩
state_before: α : Type u
β : Type ?u.252702
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
⊢ ∑ i in range n, x ^ i = 0 ↔ x = -1 ∧ Even n

tactic: contrapose! h
state_before: α : Type u
β : Type ?u.252702
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
h : ∑ i in range n, x ^ i = 0
⊢ x = -1 ∧ Even n

tactic: have hx := eq_or_ne x (-1)
state_before: α : Type u
β : Type ?u.252702
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
h : x = -1 → ¬Even n
⊢ ∑ i in range n, x ^ i ≠ 0

tactic: cases' hx with hx hx
state_before: α : Type u
β : Type ?u.252702
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
h : x = -1 → ¬Even n
hx : x = -1 ∨ x ≠ -1
⊢ ∑ i in range n, x ^ i ≠ 0

tactic: simp only [h, hn, neg_one_geom_sum, if_true]
state_before: α : Type u
β : Type ?u.252702
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn✝ : n ≠ 0
x✝ : x = -1 ∧ Even n
h : x = -1
hn : Even n
⊢ ∑ i in range n, x ^ i = 0

tactic: rw [hx, neg_one_geom_sum]
state_before: case inl
α : Type u
β : Type ?u.252702
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
h : x = -1 → ¬Even n
hx : x = -1
⊢ ∑ i in range n, x ^ i ≠ 0

tactic: simp only [h hx, ne_eq, ite_eq_left_iff, one_ne_zero, not_forall, exists_prop, and_true]
state_before: case inl
α : Type u
β : Type ?u.252702
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
h : x = -1 → ¬Even n
hx : x = -1
⊢ (if Even n then 0 else 1) ≠ 0

tactic: exact geom_sum_ne_zero hx hn
state_before: case inr
α : Type u
β : Type ?u.252702
n : ℕ
x : α
inst✝ : LinearOrderedRing α
hn : n ≠ 0
h : x = -1 → ¬Even n
hx : x ≠ -1
⊢ ∑ i in range n, x ^ i ≠ 0
Theorem: Set.Finite.pi
File: Mathlib/Data/Set/Finite.lean

tactic: cases _root_.nonempty_fintype δ
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
δ : Type u_1
inst✝ : Finite δ
κ : δ → Type u_2
t : (d : δ) → Set (κ d)
ht : ∀ (d : δ), Set.Finite (t d)
⊢ Set.Finite (Set.pi univ t)

tactic: lift t to ∀ d, Finset (κ d) using ht
state_before: case intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
δ : Type u_1
inst✝ : Finite δ
κ : δ → Type u_2
t : (d : δ) → Set (κ d)
ht : ∀ (d : δ), Set.Finite (t d)
val✝ : Fintype δ
⊢ Set.Finite (Set.pi univ t)

tactic: classical
  rw [← Fintype.coe_piFinset]
  apply Finset.finite_toSet
state_before: case intro.intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
δ : Type u_1
inst✝ : Finite δ
κ : δ → Type u_2
val✝ : Fintype δ
t : (i : δ) → Finset (κ i)
⊢ Set.Finite (Set.pi univ fun i => ↑(t i))

tactic: rw [← Fintype.coe_piFinset]
state_before: case intro.intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
δ : Type u_1
inst✝ : Finite δ
κ : δ → Type u_2
val✝ : Fintype δ
t : (i : δ) → Finset (κ i)
⊢ Set.Finite (Set.pi univ fun i => ↑(t i))

tactic: apply Finset.finite_toSet
state_before: case intro.intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
δ : Type u_1
inst✝ : Finite δ
κ : δ → Type u_2
val✝ : Fintype δ
t : (i : δ) → Finset (κ i)
⊢ Set.Finite ↑(Fintype.piFinset fun i => t i)
Theorem: Multiset.singleton_inj
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp_rw [← cons_zero]
state_before: α : Type u_1
β : Type ?u.25432
γ : Type ?u.25435
a b : α
⊢ {a} = {b} ↔ a = b

tactic: exact cons_inj_left _
state_before: α : Type u_1
β : Type ?u.25432
γ : Type ?u.25435
a b : α
⊢ a ::ₘ 0 = b ::ₘ 0 ↔ a = b
Theorem: List.length_erase_add_one
File: Mathlib/Data/List/Basic.lean

tactic: rw [erase_eq_eraseP, length_eraseP_add_one h (decide_eq_true rfl)]
state_before: ι : Type ?u.425241
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
a : α
l : List α
h : a ∈ l
⊢ length (List.erase l a) + 1 = length l
Theorem: map_eq_pure_bind
File: src/lean/Init/Control/Lawful.lean

tactic: rw [← bind_pure_comp]
state_before: m : Type u_1 → Type u_2
α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → β
x : m α
⊢ f <$> x = do
    let a ← x
    pure (f a)
Theorem: MvPolynomial.coe_injective
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: ext
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ x y : MvPolynomial σ R
h : Coe.coe x = Coe.coe y
⊢ x = y

tactic: simp_rw [← coeff_coe]
state_before: case a
σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ x y : MvPolynomial σ R
h : Coe.coe x = Coe.coe y
m✝ : σ →₀ ℕ
⊢ coeff m✝ x = coeff m✝ y

tactic: congr
state_before: case a
σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ x y : MvPolynomial σ R
h : Coe.coe x = Coe.coe y
m✝ : σ →₀ ℕ
⊢ ↑(MvPowerSeries.coeff R m✝) ↑x = ↑(MvPowerSeries.coeff R m✝) ↑y
Theorem: List.zipWithLeft_eq_zipWithLeftTR
File: Std/Data/List/Basic.lean

tactic: funext α β γ f as bs
state_before: ⊢ @zipWithLeft = @zipWithLeftTR

tactic: simp [zipWithLeftTR]
state_before: case h.h.h.h.h.h
α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs : List β
⊢ zipWithLeft f as bs = zipWithLeftTR f as bs

tactic: let rec go (acc) : ∀ as bs, zipWithLeftTR.go f as bs acc = acc.toList ++ as.zipWithLeft f bs
| [], bs => by simp [zipWithLeftTR.go]
| _::_, [] => by simp [zipWithLeftTR.go, Array.foldl_data_eq_map]
| a::as, b::bs => by simp [zipWithLeftTR.go, go _ as bs]
state_before: case h.h.h.h.h.h
α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs : List β
⊢ zipWithLeft f as bs = zipWithLeftTR.go f as bs #[]

tactic: simp [zipWithLeftTR, go]
state_before: case h.h.h.h.h.h
α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs : List β
⊢ zipWithLeft f as bs = zipWithLeftTR.go f as bs #[]

tactic: simp [zipWithLeftTR.go]
state_before: α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs✝ : List β
acc : Array γ
bs : List β
⊢ zipWithLeftTR.go f [] bs acc = Array.toList acc ++ zipWithLeft f [] bs

tactic: simp [zipWithLeftTR.go, Array.foldl_data_eq_map]
state_before: α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as : List α
bs : List β
acc : Array γ
head✝ : α
tail✝ : List α
⊢ zipWithLeftTR.go f (head✝ :: tail✝) [] acc = Array.toList acc ++ zipWithLeft f (head✝ :: tail✝) []

tactic: simp [zipWithLeftTR.go, go _ as bs]
state_before: α : Type u_3
β : Type u_2
γ : Type u_1
f : α → Option β → γ
as✝ : List α
bs✝ : List β
acc : Array γ
a : α
as : List α
b : β
bs : List β
⊢ zipWithLeftTR.go f (a :: as) (b :: bs) acc = Array.toList acc ++ zipWithLeft f (a :: as) (b :: bs)
Theorem: MvPolynomial.degrees_sum
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: refine' s.induction _ _
state_before: R : Type u
S : Type v
σ : Type u_2
τ : Type ?u.34158
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
ι : Type u_1
inst✝ : DecidableEq σ
s : Finset ι
f : ι → MvPolynomial σ R
⊢ degrees (∑ i in s, f i) ≤ Finset.sup s fun i => degrees (f i)

tactic: simp only [Finset.sum_empty, Finset.sup_empty, degrees_zero]
state_before: case refine'_1
R : Type u
S : Type v
σ : Type u_2
τ : Type ?u.34158
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
ι : Type u_1
inst✝ : DecidableEq σ
s : Finset ι
f : ι → MvPolynomial σ R
⊢ degrees (∑ i in ∅, f i) ≤ Finset.sup ∅ fun i => degrees (f i)

tactic: exact le_rfl
state_before: case refine'_1
R : Type u
S : Type v
σ : Type u_2
τ : Type ?u.34158
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
ι : Type u_1
inst✝ : DecidableEq σ
s : Finset ι
f : ι → MvPolynomial σ R
⊢ 0 ≤ ⊥

tactic: intro i s his ih
state_before: case refine'_2
R : Type u
S : Type v
σ : Type u_2
τ : Type ?u.34158
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
ι : Type u_1
inst✝ : DecidableEq σ
s : Finset ι
f : ι → MvPolynomial σ R
⊢ ∀ ⦃a : ι⦄ {s : Finset ι},
    ¬a ∈ s →
      (degrees (∑ i in s, f i) ≤ Finset.sup s fun i => degrees (f i)) →
        degrees (∑ i in insert a s, f i) ≤ Finset.sup (insert a s) fun i => degrees (f i)

tactic: rw [Finset.sup_insert, Finset.sum_insert his]
state_before: case refine'_2
R : Type u
S : Type v
σ : Type u_2
τ : Type ?u.34158
r : R
e : ℕ
n m : σ
s✝¹ : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
ι : Type u_1
inst✝ : DecidableEq σ
s✝ : Finset ι
f : ι → MvPolynomial σ R
i : ι
s : Finset ι
his : ¬i ∈ s
ih : degrees (∑ i in s, f i) ≤ Finset.sup s fun i => degrees (f i)
⊢ degrees (∑ i in insert i s, f i) ≤ Finset.sup (insert i s) fun i => degrees (f i)

tactic: exact le_trans (degrees_add _ _) (sup_le_sup_left ih _)
state_before: case refine'_2
R : Type u
S : Type v
σ : Type u_2
τ : Type ?u.34158
r : R
e : ℕ
n m : σ
s✝¹ : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
ι : Type u_1
inst✝ : DecidableEq σ
s✝ : Finset ι
f : ι → MvPolynomial σ R
i : ι
s : Finset ι
his : ¬i ∈ s
ih : degrees (∑ i in s, f i) ≤ Finset.sup s fun i => degrees (f i)
⊢ degrees (f i + ∑ x in s, f x) ≤ degrees (f i) ⊔ Finset.sup s fun i => degrees (f i)
Theorem: Set.iUnion_range_eq_iUnion
File: Mathlib/Data/Set/Lattice.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.180962
ι : Sort u_3
ι' : Sort ?u.180968
ι₂ : Sort ?u.180971
κ : ι → Sort ?u.180976
κ₁ : ι → Sort ?u.180981
κ₂ : ι → Sort ?u.180986
κ' : ι' → Sort ?u.180991
C : ι → Set α
f : (x : ι) → β → ↑(C x)
hf : ∀ (x : ι), Surjective (f x)
⊢ (⋃ (y : β), range fun x => ↑(f x y)) = ⋃ (x : ι), C x

tactic: rw [mem_iUnion, mem_iUnion]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.180962
ι : Sort u_3
ι' : Sort ?u.180968
ι₂ : Sort ?u.180971
κ : ι → Sort ?u.180976
κ₁ : ι → Sort ?u.180981
κ₂ : ι → Sort ?u.180986
κ' : ι' → Sort ?u.180991
C : ι → Set α
f : (x : ι) → β → ↑(C x)
hf : ∀ (x : ι), Surjective (f x)
x : α
⊢ (x ∈ ⋃ (y : β), range fun x => ↑(f x y)) ↔ x ∈ ⋃ (x : ι), C x

tactic: constructor
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.180962
ι : Sort u_3
ι' : Sort ?u.180968
ι₂ : Sort ?u.180971
κ : ι → Sort ?u.180976
κ₁ : ι → Sort ?u.180981
κ₂ : ι → Sort ?u.180986
κ' : ι' → Sort ?u.180991
C : ι → Set α
f : (x : ι) → β → ↑(C x)
hf : ∀ (x : ι), Surjective (f x)
x : α
⊢ (∃ i, x ∈ range fun x => ↑(f x i)) ↔ ∃ i, x ∈ C i

tactic: rintro ⟨y, i, rfl⟩
state_before: case h.mp
α : Type u_1
β : Type u_2
γ : Type ?u.180962
ι : Sort u_3
ι' : Sort ?u.180968
ι₂ : Sort ?u.180971
κ : ι → Sort ?u.180976
κ₁ : ι → Sort ?u.180981
κ₂ : ι → Sort ?u.180986
κ' : ι' → Sort ?u.180991
C : ι → Set α
f : (x : ι) → β → ↑(C x)
hf : ∀ (x : ι), Surjective (f x)
x : α
⊢ (∃ i, x ∈ range fun x => ↑(f x i)) → ∃ i, x ∈ C i

tactic: exact ⟨i, (f i y).2⟩
state_before: case h.mp.intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.180962
ι : Sort u_3
ι' : Sort ?u.180968
ι₂ : Sort ?u.180971
κ : ι → Sort ?u.180976
κ₁ : ι → Sort ?u.180981
κ₂ : ι → Sort ?u.180986
κ' : ι' → Sort ?u.180991
C : ι → Set α
f : (x : ι) → β → ↑(C x)
hf : ∀ (x : ι), Surjective (f x)
y : β
i : ι
⊢ ∃ i_1, (fun x => ↑(f x y)) i ∈ C i_1

tactic: rintro ⟨i, hx⟩
state_before: case h.mpr
α : Type u_1
β : Type u_2
γ : Type ?u.180962
ι : Sort u_3
ι' : Sort ?u.180968
ι₂ : Sort ?u.180971
κ : ι → Sort ?u.180976
κ₁ : ι → Sort ?u.180981
κ₂ : ι → Sort ?u.180986
κ' : ι' → Sort ?u.180991
C : ι → Set α
f : (x : ι) → β → ↑(C x)
hf : ∀ (x : ι), Surjective (f x)
x : α
⊢ (∃ i, x ∈ C i) → ∃ i, x ∈ range fun x => ↑(f x i)

tactic: cases' hf i ⟨x, hx⟩ with y hy
state_before: case h.mpr.intro
α : Type u_1
β : Type u_2
γ : Type ?u.180962
ι : Sort u_3
ι' : Sort ?u.180968
ι₂ : Sort ?u.180971
κ : ι → Sort ?u.180976
κ₁ : ι → Sort ?u.180981
κ₂ : ι → Sort ?u.180986
κ' : ι' → Sort ?u.180991
C : ι → Set α
f : (x : ι) → β → ↑(C x)
hf : ∀ (x : ι), Surjective (f x)
x : α
i : ι
hx : x ∈ C i
⊢ ∃ i, x ∈ range fun x => ↑(f x i)

tactic: exact ⟨y, i, congr_arg Subtype.val hy⟩
state_before: case h.mpr.intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.180962
ι : Sort u_3
ι' : Sort ?u.180968
ι₂ : Sort ?u.180971
κ : ι → Sort ?u.180976
κ₁ : ι → Sort ?u.180981
κ₂ : ι → Sort ?u.180986
κ' : ι' → Sort ?u.180991
C : ι → Set α
f : (x : ι) → β → ↑(C x)
hf : ∀ (x : ι), Surjective (f x)
x : α
i : ι
hx : x ∈ C i
y : β
hy : f i y = { val := x, property := hx }
⊢ ∃ i, x ∈ range fun x => ↑(f x i)