tasksource/leandojo huggingface dataset:
Theorem: LaurentPolynomial.isLocalization
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: cases' t with t ht
state_before: R : Type u_1
inst✝ : CommSemiring R
t : { x // x ∈ Submonoid.closure {X} }
⊢ IsUnit (↑(algebraMap R[X] R[T;T⁻¹]) ↑t)

tactic: rcases Submonoid.mem_closure_singleton.mp ht with ⟨n, rfl⟩
state_before: case mk
R : Type u_1
inst✝ : CommSemiring R
t : R[X]
ht : t ∈ Submonoid.closure {X}
⊢ IsUnit (↑(algebraMap R[X] R[T;T⁻¹]) ↑{ val := t, property := ht })

tactic: simp only [isUnit_T n, algebraMap_eq_toLaurent, Polynomial.toLaurent_X_pow]
state_before: case mk.intro
R : Type u_1
inst✝ : CommSemiring R
n : ℕ
ht : X ^ n ∈ Submonoid.closure {X}
⊢ IsUnit (↑(algebraMap R[X] R[T;T⁻¹]) ↑{ val := X ^ n, property := ht })

tactic: induction' f using LaurentPolynomial.induction_on_mul_T with f n
state_before: R : Type u_1
inst✝ : CommSemiring R
f : R[T;T⁻¹]
⊢ ∃ x, f * ↑(algebraMap R[X] R[T;T⁻¹]) ↑x.snd = ↑(algebraMap R[X] R[T;T⁻¹]) x.fst

tactic: have := (Submonoid.closure ({X} : Set R[X])).pow_mem Submonoid.mem_closure_singleton_self n
state_before: case Qf
R : Type u_1
inst✝ : CommSemiring R
f : R[X]
n : ℕ
⊢ ∃ x, ↑toLaurent f * T (-↑n) * ↑(algebraMap R[X] R[T;T⁻¹]) ↑x.snd = ↑(algebraMap R[X] R[T;T⁻¹]) x.fst

tactic: refine' ⟨(f, ⟨_, this⟩), _⟩
state_before: case Qf
R : Type u_1
inst✝ : CommSemiring R
f : R[X]
n : ℕ
this : X ^ n ∈ Submonoid.closure {X}
⊢ ∃ x, ↑toLaurent f * T (-↑n) * ↑(algebraMap R[X] R[T;T⁻¹]) ↑x.snd = ↑(algebraMap R[X] R[T;T⁻¹]) x.fst

tactic: simp only [algebraMap_eq_toLaurent, Polynomial.toLaurent_X_pow, mul_T_assoc,
  add_left_neg, T_zero, mul_one]
state_before: case Qf
R : Type u_1
inst✝ : CommSemiring R
f : R[X]
n : ℕ
this : X ^ n ∈ Submonoid.closure {X}
⊢ ↑toLaurent f * T (-↑n) * ↑(algebraMap R[X] R[T;T⁻¹]) ↑(f, { val := X ^ n, property := this }).snd =
    ↑(algebraMap R[X] R[T;T⁻¹]) (f, { val := X ^ n, property := this }).fst

tactic: rw [algebraMap_eq_toLaurent, algebraMap_eq_toLaurent, Polynomial.toLaurent_inj]
state_before: R : Type u_1
inst✝ : CommSemiring R
f g : R[X]
⊢ ↑(algebraMap R[X] R[T;T⁻¹]) f = ↑(algebraMap R[X] R[T;T⁻¹]) g ↔ ∃ c, ↑c * f = ↑c * g

tactic: refine' ⟨_, _⟩
state_before: R : Type u_1
inst✝ : CommSemiring R
f g : R[X]
⊢ f = g ↔ ∃ c, ↑c * f = ↑c * g

tactic: rintro rfl
state_before: case refine'_1
R : Type u_1
inst✝ : CommSemiring R
f g : R[X]
⊢ f = g → ∃ c, ↑c * f = ↑c * g

tactic: exact ⟨1, rfl⟩
state_before: case refine'_1
R : Type u_1
inst✝ : CommSemiring R
f : R[X]
⊢ ∃ c, ↑c * f = ↑c * f

tactic: rintro ⟨⟨h, hX⟩, h⟩
state_before: case refine'_2
R : Type u_1
inst✝ : CommSemiring R
f g : R[X]
⊢ (∃ c, ↑c * f = ↑c * g) → f = g

tactic: rcases Submonoid.mem_closure_singleton.mp hX with ⟨n, rfl⟩
state_before: case refine'_2.intro.mk
R : Type u_1
inst✝ : CommSemiring R
f g h✝ : R[X]
hX : h✝ ∈ Submonoid.closure {X}
h : ↑{ val := h✝, property := hX } * f = ↑{ val := h✝, property := hX } * g
⊢ f = g

tactic: exact mul_X_pow_injective n h
state_before: case refine'_2.intro.mk.intro
R : Type u_1
inst✝ : CommSemiring R
f g : R[X]
n : ℕ
hX : X ^ n ∈ Submonoid.closure {X}
h : ↑{ val := X ^ n, property := hX } * f = ↑{ val := X ^ n, property := hX } * g
⊢ f = g
Theorem: LinearPMap.graph_map_fst_eq_domain
File: Mathlib/LinearAlgebra/LinearPMap.lean

tactic: ext x
state_before: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.484814
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
⊢ Submodule.map (LinearMap.fst R E F) (graph f) = f.domain

tactic: simp only [Submodule.mem_map, mem_graph_iff, Subtype.exists, exists_and_left, exists_eq_left,
  LinearMap.fst_apply, Prod.exists, exists_and_right, exists_eq_right]
state_before: case h
R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.484814
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
x : E
⊢ x ∈ Submodule.map (LinearMap.fst R E F) (graph f) ↔ x ∈ f.domain

tactic: constructor <;> intro h
state_before: case h
R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.484814
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
x : E
⊢ (∃ x_1 h, ↑f { val := x, property := (_ : (x, x_1).fst ∈ f.domain) } = x_1) ↔ x ∈ f.domain

tactic: rcases h with ⟨x, hx, _⟩
state_before: case h.mp
R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.484814
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
x : E
h : ∃ x_1 h, ↑f { val := x, property := (_ : (x, x_1).fst ∈ f.domain) } = x_1
⊢ x ∈ f.domain

tactic: exact hx
state_before: case h.mp.intro.intro
R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.484814
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
x✝ : E
x : F
hx : x✝ ∈ f.domain
h✝ : ↑f { val := x✝, property := (_ : (x✝, x).fst ∈ f.domain) } = x
⊢ x✝ ∈ f.domain

tactic: use f ⟨x, h⟩
state_before: case h.mpr
R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.484814
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
x : E
h : x ∈ f.domain
⊢ ∃ x_1 h, ↑f { val := x, property := (_ : (x, x_1).fst ∈ f.domain) } = x_1

tactic: simp only [h, exists_prop]
state_before: case h.mpr
R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.484814
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
x : E
h : x ∈ f.domain
⊢ ∃ h_1,
    ↑f { val := x, property := (_ : (x, ↑f { val := x, property := h }).fst ∈ f.domain) } =
      ↑f { val := x, property := h }
Theorem: Int.le_sub_left_of_add_le
File: Std/Data/Int/Lemmas.lean

tactic: have h := Int.add_le_add_right h (-a)
state_before: a b c : Int
h : a + b ≤ c
⊢ b ≤ c - a

tactic: rwa [Int.add_comm a b, Int.add_neg_cancel_right] at h
state_before: a b c : Int
h✝ : a + b ≤ c
h : a + b + -a ≤ c + -a
⊢ b ≤ c - a
Theorem: Real.geom_mean_eq_arith_mean_weighted_of_constant
File: Mathlib/Analysis/MeanInequalities.lean

tactic: rw [geom_mean_weighted_of_constant, arith_mean_weighted_of_constant] <;> assumption
state_before: ι : Type u
s : Finset ι
w z : ι → ℝ
x : ℝ
hw : ∀ (i : ι), i ∈ s → 0 ≤ w i
hw' : ∑ i in s, w i = 1
hz : ∀ (i : ι), i ∈ s → 0 ≤ z i
hx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x
⊢ ∏ i in s, z i ^ w i = ∑ i in s, w i * z i
Theorem: FirstOrder.Language.BoundedFormula.relabel_not
File: Mathlib/ModelTheory/Syntax.lean

tactic: simp [BoundedFormula.not]
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.95799
P : Type ?u.95802
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
γ : Type ?u.95830
n : ℕ
g : α → β ⊕ Fin n
k : ℕ
φ : BoundedFormula L α k
⊢ relabel g (BoundedFormula.not φ) = BoundedFormula.not (relabel g φ)
Theorem: Finset.Ico_subset_Ioo_left
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: rw [← coe_subset, coe_Ico, coe_Ioo]
state_before: ι : Type ?u.22266
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
h : a₁ < a₂
⊢ Ico a₂ b ⊆ Ioo a₁ b

tactic: exact Set.Ico_subset_Ioo_left h
state_before: ι : Type ?u.22266
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
h : a₁ < a₂
⊢ Set.Ico a₂ b ⊆ Set.Ioo a₁ b
Theorem: CategoryTheory.Limits.cokernelIsoOfEq_hom_comp_desc
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: simp [h, he]
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝² : HasCokernel f✝
Z : C
f g : X ⟶ Y
inst✝¹ : HasCokernel f
inst✝ : HasCokernel g
h : f = g
e : Y ⟶ Z
he : g ≫ e = 0
⊢ f ≫ e = 0

tactic: cases h
state_before: C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝² : HasCokernel f✝
Z : C
f g : X ⟶ Y
inst✝¹ : HasCokernel f
inst✝ : HasCokernel g
h : f = g
e : Y ⟶ Z
he : g ≫ e = 0
⊢ (cokernelIsoOfEq h).hom ≫ cokernel.desc g e he = cokernel.desc f e (_ : f ≫ e = 0)

tactic: simp
state_before: case refl
C : Type u
inst✝⁴ : Category C
inst✝³ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝² : HasCokernel f✝
Z : C
f : X ⟶ Y
inst✝¹ : HasCokernel f
e : Y ⟶ Z
inst✝ : HasCokernel f
he : f ≫ e = 0
⊢ (cokernelIsoOfEq (_ : f = f)).hom ≫ cokernel.desc f e he = cokernel.desc f e (_ : f ≫ e = 0)
Theorem: List.map_dlookup_eq_find
File: Mathlib/Data/List/Sigma.lean

tactic: by_cases h : a = a'
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b' : β a'
l : List (Sigma β)
⊢ Option.map (Sigma.mk a) (dlookup a ({ fst := a', snd := b' } :: l)) =
    find? (fun s => decide (a = s.fst)) ({ fst := a', snd := b' } :: l)

tactic: subst a'
state_before: case pos
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b' : β a'
l : List (Sigma β)
h : a = a'
⊢ Option.map (Sigma.mk a) (dlookup a ({ fst := a', snd := b' } :: l)) =
    find? (fun s => decide (a = s.fst)) ({ fst := a', snd := b' } :: l)

tactic: simp
state_before: case pos
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
b' : β a
⊢ Option.map (Sigma.mk a) (dlookup a ({ fst := a, snd := b' } :: l)) =
    find? (fun s => decide (a = s.fst)) ({ fst := a, snd := b' } :: l)

tactic: simp [h]
state_before: case neg
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b' : β a'
l : List (Sigma β)
h : ¬a = a'
⊢ Option.map (Sigma.mk a) (dlookup a ({ fst := a', snd := b' } :: l)) =
    find? (fun s => decide (a = s.fst)) ({ fst := a', snd := b' } :: l)

tactic: exact map_dlookup_eq_find a l
state_before: case neg
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b' : β a'
l : List (Sigma β)
h : ¬a = a'
⊢ Option.map (Sigma.mk a) (dlookup a l) = find? (fun s => decide (a = s.fst)) l
Theorem: smul_neg_iff_of_pos
File: Mathlib/Algebra/Order/Module.lean

tactic: rw [← neg_neg a, smul_neg, neg_neg_iff_pos, neg_neg_iff_pos]
state_before: k : Type u_1
M : Type u_2
N : Type ?u.2442
inst✝³ : OrderedSemiring k
inst✝² : OrderedAddCommGroup M
inst✝¹ : Module k M
inst✝ : OrderedSMul k M
a b : M
c : k
hc : 0 < c
⊢ c • a < 0 ↔ a < 0

tactic: exact smul_pos_iff_of_pos hc
state_before: k : Type u_1
M : Type u_2
N : Type ?u.2442
inst✝³ : OrderedSemiring k
inst✝² : OrderedAddCommGroup M
inst✝¹ : Module k M
inst✝ : OrderedSMul k M
a b : M
c : k
hc : 0 < c
⊢ 0 < c • -a ↔ 0 < -a
Theorem: Metric.uniformEquicontinuous_of_continuity_modulus
File: Mathlib/Topology/MetricSpace/Equicontinuity.lean

tactic: rw [Metric.uniformEquicontinuous_iff]
state_before: α : Type u_3
β : Type u_2
ι✝ : Type ?u.4017
inst✝¹ : PseudoMetricSpace α
ι : Type u_1
inst✝ : PseudoMetricSpace β
b : ℝ → ℝ
b_lim : Tendsto b (𝓝 0) (𝓝 0)
F : ι → β → α
H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)
⊢ UniformEquicontinuous F

tactic: intro ε ε0
state_before: α : Type u_3
β : Type u_2
ι✝ : Type ?u.4017
inst✝¹ : PseudoMetricSpace α
ι : Type u_1
inst✝ : PseudoMetricSpace β
b : ℝ → ℝ
b_lim : Tendsto b (𝓝 0) (𝓝 0)
F : ι → β → α
H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)
⊢ ∀ (ε : ℝ), ε > 0 → ∃ δ, δ > 0 ∧ ∀ (x y : β), dist x y < δ → ∀ (i : ι), dist (F i x) (F i y) < ε

tactic: rcases tendsto_nhds_nhds.1 b_lim ε ε0 with ⟨δ, δ0, hδ⟩
state_before: α : Type u_3
β : Type u_2
ι✝ : Type ?u.4017
inst✝¹ : PseudoMetricSpace α
ι : Type u_1
inst✝ : PseudoMetricSpace β
b : ℝ → ℝ
b_lim : Tendsto b (𝓝 0) (𝓝 0)
F : ι → β → α
H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)
ε : ℝ
ε0 : ε > 0
⊢ ∃ δ, δ > 0 ∧ ∀ (x y : β), dist x y < δ → ∀ (i : ι), dist (F i x) (F i y) < ε

tactic: refine' ⟨δ, δ0, fun x y hxy i => _⟩
state_before: case intro.intro
α : Type u_3
β : Type u_2
ι✝ : Type ?u.4017
inst✝¹ : PseudoMetricSpace α
ι : Type u_1
inst✝ : PseudoMetricSpace β
b : ℝ → ℝ
b_lim : Tendsto b (𝓝 0) (𝓝 0)
F : ι → β → α
H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδ : ∀ {x : ℝ}, dist x 0 < δ → dist (b x) 0 < ε
⊢ ∃ δ, δ > 0 ∧ ∀ (x y : β), dist x y < δ → ∀ (i : ι), dist (F i x) (F i y) < ε

tactic: calc
  dist (F i x) (F i y) ≤ b (dist x y) := H x y i
  _ ≤ |b (dist x y)| := (le_abs_self _)
  _ = dist (b (dist x y)) 0 := by simp [Real.dist_eq]
  _ < ε := hδ (by simpa only [Real.dist_eq, tsub_zero, abs_dist] using hxy)
state_before: case intro.intro
α : Type u_3
β : Type u_2
ι✝ : Type ?u.4017
inst✝¹ : PseudoMetricSpace α
ι : Type u_1
inst✝ : PseudoMetricSpace β
b : ℝ → ℝ
b_lim : Tendsto b (𝓝 0) (𝓝 0)
F : ι → β → α
H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδ : ∀ {x : ℝ}, dist x 0 < δ → dist (b x) 0 < ε
x y : β
hxy : dist x y < δ
i : ι
⊢ dist (F i x) (F i y) < ε

tactic: simp [Real.dist_eq]
state_before: α : Type u_3
β : Type u_2
ι✝ : Type ?u.4017
inst✝¹ : PseudoMetricSpace α
ι : Type u_1
inst✝ : PseudoMetricSpace β
b : ℝ → ℝ
b_lim : Tendsto b (𝓝 0) (𝓝 0)
F : ι → β → α
H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδ : ∀ {x : ℝ}, dist x 0 < δ → dist (b x) 0 < ε
x y : β
hxy : dist x y < δ
i : ι
⊢ abs (b (dist x y)) = dist (b (dist x y)) 0

tactic: simpa only [Real.dist_eq, tsub_zero, abs_dist] using hxy
state_before: α : Type u_3
β : Type u_2
ι✝ : Type ?u.4017
inst✝¹ : PseudoMetricSpace α
ι : Type u_1
inst✝ : PseudoMetricSpace β
b : ℝ → ℝ
b_lim : Tendsto b (𝓝 0) (𝓝 0)
F : ι → β → α
H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδ : ∀ {x : ℝ}, dist x 0 < δ → dist (b x) 0 < ε
x y : β
hxy : dist x y < δ
i : ι
⊢ dist (dist x y) 0 < δ
Theorem: LinearMap.det_eq_one_of_subsingleton
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: have b : Basis (Fin 0) R M := Basis.empty M
state_before: R : Type u_2
inst✝¹⁰ : CommRing R
M : Type u_1
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
M' : Type ?u.929764
inst✝⁷ : AddCommGroup M'
inst✝⁶ : Module R M'
ι : Type ?u.930306
inst✝⁵ : DecidableEq ι
inst✝⁴ : Fintype ι
e : Basis ι R M
A : Type ?u.930784
inst✝³ : CommRing A
inst✝² : Module A M
κ : Type ?u.931282
inst✝¹ : Fintype κ
inst✝ : Subsingleton M
f : M →ₗ[R] M
⊢ ↑LinearMap.det f = 1

tactic: rw [← f.det_toMatrix b]
state_before: R : Type u_2
inst✝¹⁰ : CommRing R
M : Type u_1
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
M' : Type ?u.929764
inst✝⁷ : AddCommGroup M'
inst✝⁶ : Module R M'
ι : Type ?u.930306
inst✝⁵ : DecidableEq ι
inst✝⁴ : Fintype ι
e : Basis ι R M
A : Type ?u.930784
inst✝³ : CommRing A
inst✝² : Module A M
κ : Type ?u.931282
inst✝¹ : Fintype κ
inst✝ : Subsingleton M
f : M →ₗ[R] M
b : Basis (Fin 0) R M
⊢ ↑LinearMap.det f = 1

tactic: exact Matrix.det_isEmpty
state_before: R : Type u_2
inst✝¹⁰ : CommRing R
M : Type u_1
inst✝⁹ : AddCommGroup M
inst✝⁸ : Module R M
M' : Type ?u.929764
inst✝⁷ : AddCommGroup M'
inst✝⁶ : Module R M'
ι : Type ?u.930306
inst✝⁵ : DecidableEq ι
inst✝⁴ : Fintype ι
e : Basis ι R M
A : Type ?u.930784
inst✝³ : CommRing A
inst✝² : Module A M
κ : Type ?u.931282
inst✝¹ : Fintype κ
inst✝ : Subsingleton M
f : M →ₗ[R] M
b : Basis (Fin 0) R M
⊢ det (↑(toMatrix b b) f) = 1
Theorem: partialSups_eq_sup'_range
File: Mathlib/Order/PartialSups.lean

tactic: induction' n with n ih
state_before: α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
n : ℕ
⊢ ↑(partialSups f) n = Finset.sup' (Finset.range (n + 1)) (_ : ∃ x, x ∈ Finset.range (n + 1)) f

tactic: simp
state_before: case zero
α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
⊢ ↑(partialSups f) Nat.zero = Finset.sup' (Finset.range (Nat.zero + 1)) (_ : ∃ x, x ∈ Finset.range (Nat.zero + 1)) f

tactic: dsimp [partialSups] at ih⊢
state_before: case succ
α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
n : ℕ
ih : ↑(partialSups f) n = Finset.sup' (Finset.range (n + 1)) (_ : ∃ x, x ∈ Finset.range (n + 1)) f
⊢ ↑(partialSups f) (Nat.succ n) =
    Finset.sup' (Finset.range (Nat.succ n + 1)) (_ : ∃ x, x ∈ Finset.range (Nat.succ n + 1)) f

tactic: simp_rw [@Finset.range_succ n.succ]
state_before: case succ
α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
n : ℕ
ih :
  Nat.rec (f 0) (fun n a => a ⊔ f (n + 1)) n = Finset.sup' (Finset.range (n + 1)) (_ : ∃ x, x ∈ Finset.range (n + 1)) f
⊢ Nat.rec (f 0) (fun n a => a ⊔ f (n + 1)) n ⊔ f (n + 1) =
    Finset.sup' (Finset.range (Nat.succ n + 1)) (_ : ∃ x, x ∈ Finset.range (Nat.succ n + 1)) f

tactic: rw [ih, Finset.sup'_insert, sup_comm]
state_before: case succ
α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
n : ℕ
ih :
  Nat.rec (f 0) (fun n a => a ⊔ f (n + 1)) n = Finset.sup' (Finset.range (n + 1)) (_ : ∃ x, x ∈ Finset.range (n + 1)) f
⊢ Nat.rec (f 0) (fun n a => a ⊔ f (n + 1)) n ⊔ f (n + 1) =
    Finset.sup' (insert (Nat.succ n) (Finset.range (Nat.succ n)))
      (_ : Finset.Nonempty (insert (Nat.succ n) (Finset.range (Nat.succ n)))) fun x => f x
Theorem: PrincipalSeg.irrefl
File: Mathlib/Order/InitialSeg.lean

tactic: have h := f.lt_top f.top
state_before: α : Type u_1
β : Type ?u.37084
γ : Type ?u.37087
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
f : r ≺i r
⊢ False

tactic: rw [show f f.top = f.top from InitialSeg.eq (↑f) (InitialSeg.refl r) f.top] at h
state_before: α : Type u_1
β : Type ?u.37084
γ : Type ?u.37087
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
f : r ≺i r
h : r (↑f.toRelEmbedding f.top) f.top
⊢ False

tactic: exact _root_.irrefl _ h
state_before: α : Type u_1
β : Type ?u.37084
γ : Type ?u.37087
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
f : r ≺i r
h : r f.top f.top
⊢ False
Theorem: Nat.Primrec'.head
File: Mathlib/Computability/Primrec.lean

tactic: simp [get_zero]
state_before: n : ℕ
v : Vector ℕ (Nat.succ n)
⊢ Vector.get v 0 = Vector.head v
Theorem: CategoryTheory.Limits.Fork.π_comp_hom
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

tactic: cases s
state_before: C : Type u
inst✝ : Category C
X Y : C
f✝ g : X ⟶ Y
s t : Cofork f✝ g
f : s ⟶ t
⊢ Cofork.π s ≫ f.Hom = Cofork.π t

tactic: cases t
state_before: case mk
C : Type u
inst✝ : Category C
X Y : C
f✝ g : X ⟶ Y
t : Cofork f✝ g
pt✝ : C
ι✝ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝
f : { pt := pt✝, ι := ι✝ } ⟶ t
⊢ Cofork.π { pt := pt✝, ι := ι✝ } ≫ f.Hom = Cofork.π t

tactic: cases f
state_before: case mk.mk
C : Type u
inst✝ : Category C
X Y : C
f✝ g : X ⟶ Y
pt✝¹ : C
ι✝¹ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝¹
pt✝ : C
ι✝ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝
f : { pt := pt✝¹, ι := ι✝¹ } ⟶ { pt := pt✝, ι := ι✝ }
⊢ Cofork.π { pt := pt✝¹, ι := ι✝¹ } ≫ f.Hom = Cofork.π { pt := pt✝, ι := ι✝ }

tactic: aesop
state_before: case mk.mk.mk
C : Type u
inst✝ : Category C
X Y : C
f g : X ⟶ Y
pt✝¹ : C
ι✝¹ : parallelPair f g ⟶ (Functor.const WalkingParallelPair).obj pt✝¹
pt✝ : C
ι✝ : parallelPair f g ⟶ (Functor.const WalkingParallelPair).obj pt✝
Hom✝ : { pt := pt✝¹, ι := ι✝¹ }.pt ⟶ { pt := pt✝, ι := ι✝ }.pt
w✝ : ∀ (j : WalkingParallelPair), { pt := pt✝¹, ι := ι✝¹ }.ι.app j ≫ Hom✝ = { pt := pt✝, ι := ι✝ }.ι.app j
⊢ Cofork.π { pt := pt✝¹, ι := ι✝¹ } ≫ (CoconeMorphism.mk Hom✝).Hom = Cofork.π { pt := pt✝, ι := ι✝ }
Theorem: one_sub_goldConj
File: Mathlib/Data/Real/GoldenRatio.lean

tactic: linarith [gold_add_goldConj]
state_before: ⊢ 1 - φ = ψ
Theorem: Nat.find_add
File: Mathlib/Data/Nat/Order/Basic.lean

tactic: refine ((le_find_iff _ _).2 fun m hm hpm => hm.not_le ?_).antisymm ?_
state_before: m n k l : ℕ
p q : ℕ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
hₘ : ∃ m, p (m + n)
hₙ : ∃ n, p n
hn : n ≤ Nat.find hₙ
⊢ Nat.find hₘ + n = Nat.find hₙ

tactic: have hnm : n ≤ m := hn.trans (find_le hpm)
state_before: case refine_1
m✝ n k l : ℕ
p q : ℕ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
hₘ : ∃ m, p (m + n)
hₙ : ∃ n, p n
hn : n ≤ Nat.find hₙ
m : ℕ
hm : m < Nat.find hₘ + n
hpm : p m
⊢ Nat.find hₘ + n ≤ m

tactic: refine add_le_of_le_tsub_right_of_le hnm (find_le ?_)
state_before: case refine_1
m✝ n k l : ℕ
p q : ℕ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
hₘ : ∃ m, p (m + n)
hₙ : ∃ n, p n
hn : n ≤ Nat.find hₙ
m : ℕ
hm : m < Nat.find hₘ + n
hpm : p m
hnm : n ≤ m
⊢ Nat.find hₘ + n ≤ m

tactic: rwa [tsub_add_cancel_of_le hnm]
state_before: case refine_1
m✝ n k l : ℕ
p q : ℕ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
hₘ : ∃ m, p (m + n)
hₙ : ∃ n, p n
hn : n ≤ Nat.find hₙ
m : ℕ
hm : m < Nat.find hₘ + n
hpm : p m
hnm : n ≤ m
⊢ p (m - n + n)

tactic: rw [← tsub_le_iff_right]
state_before: case refine_2
m n k l : ℕ
p q : ℕ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
hₘ : ∃ m, p (m + n)
hₙ : ∃ n, p n
hn : n ≤ Nat.find hₙ
⊢ Nat.find hₙ ≤ Nat.find hₘ + n

tactic: refine (le_find_iff _ _).2 fun m hm hpm => hm.not_le ?_
state_before: case refine_2
m n k l : ℕ
p q : ℕ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
hₘ : ∃ m, p (m + n)
hₙ : ∃ n, p n
hn : n ≤ Nat.find hₙ
⊢ Nat.find hₙ - n ≤ Nat.find hₘ

tactic: rw [tsub_le_iff_right]
state_before: case refine_2
m✝ n k l : ℕ
p q : ℕ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
hₘ : ∃ m, p (m + n)
hₙ : ∃ n, p n
hn : n ≤ Nat.find hₙ
m : ℕ
hm : m < Nat.find hₙ - n
hpm : p (m + n)
⊢ Nat.find hₙ - n ≤ m

tactic: exact find_le hpm
state_before: case refine_2
m✝ n k l : ℕ
p q : ℕ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
hₘ : ∃ m, p (m + n)
hₙ : ∃ n, p n
hn : n ≤ Nat.find hₙ
m : ℕ
hm : m < Nat.find hₙ - n
hpm : p (m + n)
⊢ Nat.find hₙ ≤ m + n
Theorem: isSquare_iff_exists_sq
File: Mathlib/Algebra/Parity.lean

tactic: simp [IsSquare, pow_two]
state_before: F : Type ?u.5168
α : Type u_1
β : Type ?u.5174
R : Type ?u.5177
inst✝ : Monoid α
n : ℕ
a m : α
⊢ IsSquare m ↔ ∃ c, m = c ^ 2
Theorem: Nat.bodd_bit
File: Mathlib/Init/Data/Nat/Bitwise.lean

tactic: rw [bit_val]
state_before: b : Bool
n : ℕ
⊢ bodd (bit b n) = b

tactic: simp
state_before: b : Bool
n : ℕ
⊢ bodd (2 * n + bif b then 1 else 0) = b

tactic: cases b <;> cases bodd n <;> rfl
state_before: b : Bool
n : ℕ
⊢ bodd (bif b then 1 else 0) = b