tasksource/leandojo huggingface dataset:
Theorem: PythagoreanTriple.isPrimitiveClassified_of_coprime_of_pos
File: Mathlib/NumberTheory/PythagoreanTriples.lean

tactic: cases' h.even_odd_of_coprime hc with h1 h2
state_before: x y z : ℤ
h : PythagoreanTriple x y z
hc : Int.gcd x y = 1
hzpos : 0 < z
⊢ IsPrimitiveClassified h

tactic: rw [Int.gcd_comm] at hc
state_before: case inr
x y z : ℤ
h : PythagoreanTriple x y z
hc : Int.gcd x y = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
⊢ IsPrimitiveClassified h

tactic: obtain ⟨m, n, H⟩ := h.symm.isPrimitiveClassified_of_coprime_of_odd_of_pos hc h2.left hzpos
state_before: case inr
x y z : ℤ
h : PythagoreanTriple x y z
hc : Int.gcd y x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
⊢ IsPrimitiveClassified h

tactic: use m, n
state_before: case inr.intro.intro
x y z : ℤ
h : PythagoreanTriple x y z
hc : Int.gcd y x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
m n : ℤ
H :
  (y = m ^ 2 - n ^ 2 ∧ x = 2 * m * n ∨ y = 2 * m * n ∧ x = m ^ 2 - n ^ 2) ∧
    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)
⊢ IsPrimitiveClassified h

tactic: tauto
state_before: case inr.intro.intro
x y z : ℤ
h : PythagoreanTriple x y z
hc : Int.gcd y x = 1
hzpos : 0 < z
h2 : x % 2 = 1 ∧ y % 2 = 0
m n : ℤ
H :
  (y = m ^ 2 - n ^ 2 ∧ x = 2 * m * n ∨ y = 2 * m * n ∧ x = m ^ 2 - n ^ 2) ∧
    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)
⊢ (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧
    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)

tactic: exact h.isPrimitiveClassified_of_coprime_of_odd_of_pos hc h1.right hzpos
state_before: case inl
x y z : ℤ
h : PythagoreanTriple x y z
hc : Int.gcd x y = 1
hzpos : 0 < z
h1 : x % 2 = 0 ∧ y % 2 = 1
⊢ IsPrimitiveClassified h
Theorem: Complex.arg_neg_one
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: simp [arg, le_refl, not_le.2 (zero_lt_one' ℝ)]
state_before: ⊢ arg (-1) = π
Theorem: LinearMap.toMatrixAlgEquiv_id
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: simp_rw [LinearMap.toMatrixAlgEquiv, AlgEquiv.ofLinearEquiv_apply, LinearMap.toMatrix_id]
state_before: R : Type u_1
inst✝⁹ : CommSemiring R
l : Type ?u.2558362
m : Type ?u.2558365
n : Type u_2
inst✝⁸ : Fintype n
inst✝⁷ : Fintype m
inst✝⁶ : DecidableEq n
M₁ : Type u_3
M₂ : Type ?u.2558389
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
v₁ : Basis n R M₁
v₂ : Basis m R M₂
M₃ : Type ?u.2558891
inst✝¹ : AddCommMonoid M₃
inst✝ : Module R M₃
v₃ : Basis l R M₃
⊢ ↑(toMatrixAlgEquiv v₁) id = 1
Theorem: Real.Angle.abs_cos_eq_of_two_nsmul_eq
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [two_nsmul_eq_iff] at h
state_before: θ ψ : Angle
h : 2 • θ = 2 • ψ
⊢ abs (cos θ) = abs (cos ψ)

tactic: rcases h with (rfl | rfl)
state_before: θ ψ : Angle
h : θ = ψ ∨ θ = ψ + ↑π
⊢ abs (cos θ) = abs (cos ψ)

tactic: rfl
state_before: case inl
θ : Angle
⊢ abs (cos θ) = abs (cos θ)

tactic: rw [cos_add_pi, abs_neg]
state_before: case inr
ψ : Angle
⊢ abs (cos (ψ + ↑π)) = abs (cos ψ)
Theorem: IsCompact.mul_closedBall_one
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: rw [hs.cthickening_eq_biUnion_closedBall hδ]
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
hs : IsCompact s
hδ : 0 ≤ δ
⊢ s * closedBall 1 δ = cthickening δ s

tactic: ext x
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
hs : IsCompact s
hδ : 0 ≤ δ
⊢ s * closedBall 1 δ = ⋃ (x : E) (_ : x ∈ s), closedBall x δ

tactic: simp only [mem_mul, dist_eq_norm_div, exists_prop, mem_iUnion, mem_closedBall, exists_and_left,
  mem_closedBall_one_iff, ← eq_div_iff_mul_eq'', div_one, exists_eq_right]
state_before: case h
E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x✝ y : E
hs : IsCompact s
hδ : 0 ≤ δ
x : E
⊢ x ∈ s * closedBall 1 δ ↔ x ∈ ⋃ (x : E) (_ : x ∈ s), closedBall x δ
Theorem: Substring.ValidFor.all
File: Std/Data/String/Lemmas.lean

tactic: simp [Substring.all, h.any, List.all_eq_not_any_not]
state_before: l m r : List Char
f : Char → Bool
x✝ : Substring
h : ValidFor l m r x✝
⊢ Substring.all x✝ f = List.all m f
Theorem: ProbabilityTheory.IndepSets.bInter
File: Mathlib/Probability/Independence/Basic.lean

tactic: intro t1 t2 ht1 ht2
state_before: Ω : Type u_1
ι : Type u_2
inst✝ : MeasurableSpace Ω
s : ι → Set (Set Ω)
s' : Set (Set Ω)
μ : MeasureTheory.Measure Ω
u : Set ι
h : ∃ n, n ∈ u ∧ IndepSets (s n) s'
⊢ IndepSets (⋂ (n : ι) (_ : n ∈ u), s n) s'

tactic: rcases h with ⟨n, hn, h⟩
state_before: Ω : Type u_1
ι : Type u_2
inst✝ : MeasurableSpace Ω
s : ι → Set (Set Ω)
s' : Set (Set Ω)
μ : MeasureTheory.Measure Ω
u : Set ι
h : ∃ n, n ∈ u ∧ IndepSets (s n) s'
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ (n : ι) (_ : n ∈ u), s n
ht2 : t2 ∈ s'
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: exact h t1 t2 (Set.biInter_subset_of_mem hn ht1) ht2
state_before: case intro.intro
Ω : Type u_1
ι : Type u_2
inst✝ : MeasurableSpace Ω
s : ι → Set (Set Ω)
s' : Set (Set Ω)
μ : MeasureTheory.Measure Ω
u : Set ι
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ (n : ι) (_ : n ∈ u), s n
ht2 : t2 ∈ s'
n : ι
hn : n ∈ u
h : IndepSets (s n) s'
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2
Theorem: List.IsRotated.reverse
File: Mathlib/Data/List/Rotate.lean

tactic: obtain ⟨n, rfl⟩ := h
state_before: α : Type u
l l' : List α
h : l ~r l'
⊢ List.reverse l ~r List.reverse l'

tactic: exact ⟨_, (reverse_rotate _ _).symm⟩
state_before: case intro
α : Type u
l : List α
n : ℕ
⊢ List.reverse l ~r List.reverse (rotate l n)
Theorem: thickening_cthickening
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

tactic: obtain rfl | hδ := hδ.eq_or_lt
state_before: 𝕜 : Type ?u.230231
E : Type u_1
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x y z : E
δ ε : ℝ
hε : 0 < ε
hδ : 0 ≤ δ
s : Set E
⊢ thickening ε (cthickening δ s) = thickening (ε + δ) s

tactic: rw [cthickening_zero, thickening_closure, add_zero]
state_before: case inl
𝕜 : Type ?u.230231
E : Type u_1
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x y z : E
ε : ℝ
hε : 0 < ε
s : Set E
hδ : 0 ≤ 0
⊢ thickening ε (cthickening 0 s) = thickening (ε + 0) s

tactic: rw [← closure_thickening hδ, thickening_closure, thickening_thickening hε hδ]
state_before: case inr
𝕜 : Type ?u.230231
E : Type u_1
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x y z : E
δ ε : ℝ
hε : 0 < ε
hδ✝ : 0 ≤ δ
s : Set E
hδ : 0 < δ
⊢ thickening ε (cthickening δ s) = thickening (ε + δ) s
Theorem: Real.arccos_one
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: simp [arccos]
state_before: ⊢ arccos 1 = 0
Theorem: le_iInf₂_iff
File: Mathlib/Order/CompleteLattice.lean

tactic: simp_rw [le_iInf_iff]
state_before: α : Type u_1
β : Type ?u.75412
β₂ : Type ?u.75415
γ : Type ?u.75418
ι : Sort u_2
ι' : Sort ?u.75424
κ : ι → Sort u_3
κ' : ι' → Sort ?u.75434
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b : α
f : (i : ι) → κ i → α
⊢ (a ≤ ⨅ (i : ι) (j : κ i), f i j) ↔ ∀ (i : ι) (j : κ i), a ≤ f i j
Theorem: NormedAddGroupHom.NormNoninc.normNoninc_iff_norm_le_one
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: refine' ⟨fun h => _, fun h => fun v => _⟩
state_before: V : Type u_1
W : Type u_2
V₁ : Type ?u.495566
V₂ : Type ?u.495569
V₃ : Type ?u.495572
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup W
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f : NormedAddGroupHom V W
⊢ NormNoninc f ↔ ‖f‖ ≤ 1

tactic: refine' opNorm_le_bound _ zero_le_one fun v => _
state_before: case refine'_1
V : Type u_1
W : Type u_2
V₁ : Type ?u.495566
V₂ : Type ?u.495569
V₃ : Type ?u.495572
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup W
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f : NormedAddGroupHom V W
h : NormNoninc f
⊢ ‖f‖ ≤ 1

tactic: simpa [one_mul] using h v
state_before: case refine'_1
V : Type u_1
W : Type u_2
V₁ : Type ?u.495566
V₂ : Type ?u.495569
V₃ : Type ?u.495572
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup W
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f : NormedAddGroupHom V W
h : NormNoninc f
v : V
⊢ ‖↑f v‖ ≤ 1 * ‖v‖

tactic: simpa using le_of_opNorm_le f h v
state_before: case refine'_2
V : Type u_1
W : Type u_2
V₁ : Type ?u.495566
V₂ : Type ?u.495569
V₃ : Type ?u.495572
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup W
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f : NormedAddGroupHom V W
h : ‖f‖ ≤ 1
v : V
⊢ ‖↑f v‖ ≤ ‖v‖
Theorem: mul_div_cancel'_right
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [← mul_div_assoc, mul_div_cancel''']
state_before: α : Type ?u.71877
β : Type ?u.71880
G : Type u_1
inst✝ : CommGroup G
a✝ b✝ c d a b : G
⊢ a * (b / a) = b
Theorem: Nat.Primrec'.vec_iff
File: Mathlib/Computability/Primrec.lean

tactic: simpa using Primrec.vector_ofFn fun i => to_prim (h i)
state_before: m n : ℕ
f : Vector ℕ m → Vector ℕ n
h : Vec f
⊢ Primrec f
Theorem: List.Func.get_set
File: Mathlib/Data/List/Func.lean

tactic: cases as <;> rfl
state_before: α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
⊢ get 0 (as {0 ↦ a}) = a

tactic: cases as <;> simp [get_set]
state_before: α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
as : List α
⊢ get (k + 1) (as {k + 1 ↦ a}) = a
Theorem: SimpleGraph.Partition.partOfVertex_ne_of_adj
File: Mathlib/Combinatorics/SimpleGraph/Partition.lean

tactic: intro hn
state_before: V : Type u
G : SimpleGraph V
P : Partition G
v w : V
h : Adj G v w
⊢ partOfVertex P v ≠ partOfVertex P w

tactic: have hw := P.mem_partOfVertex w
state_before: V : Type u
G : SimpleGraph V
P : Partition G
v w : V
h : Adj G v w
hn : partOfVertex P v = partOfVertex P w
⊢ False

tactic: rw [← hn] at hw
state_before: V : Type u
G : SimpleGraph V
P : Partition G
v w : V
h : Adj G v w
hn : partOfVertex P v = partOfVertex P w
hw : w ∈ partOfVertex P w
⊢ False

tactic: exact P.independent _ (P.partOfVertex_mem v) (P.mem_partOfVertex v) hw (G.ne_of_adj h) h
state_before: V : Type u
G : SimpleGraph V
P : Partition G
v w : V
h : Adj G v w
hn : partOfVertex P v = partOfVertex P w
hw : w ∈ partOfVertex P v
⊢ False
Theorem: IsSemiringHom.to_isAddMonoidHom
File: Mathlib/Deprecated/Ring.lean

tactic: apply @‹IsSemiringHom f›.map_add
state_before: α : Type u
β : Type v
inst✝¹ : Semiring α
inst✝ : Semiring β
f : α → β
hf✝ : IsSemiringHom f
x y : α
hf : IsSemiringHom f
src✝ : IsSemiringHom f := hf
⊢ ∀ (x y : α), f (x + y) = f x + f y
Theorem: Complex.rank_real_complex'
File: Mathlib/Data/Complex/Module.lean

tactic: rw [← finrank_eq_rank, finrank_real_complex, Cardinal.lift_natCast, Nat.cast_ofNat]
state_before: R : Type ?u.169709
S : Type ?u.169712
⊢ Cardinal.lift (Module.rank ℝ ℂ) = 2
Theorem: Nat.factors_zero
File: Mathlib/Data/Nat/Factors.lean

tactic: rw [factors]
state_before: ⊢ factors 0 = []
Theorem: ENat.toNat_eq_iff
File: Mathlib/Data/ENat/Basic.lean

tactic: induction m using ENat.recTopCoe <;> simp [hn.symm]
state_before: m✝ n✝ m : ℕ∞
n : ℕ
hn : n ≠ 0
⊢ ↑toNat m = n ↔ m = ↑n
Theorem: Ordinal.lsub_le_iff
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: convert sup_le_iff.{_, v} (f := succ ∘ f) (a := a) using 2
state_before: α : Type ?u.318577
β : Type ?u.318580
γ : Type ?u.318583
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal
a : Ordinal
⊢ lsub f ≤ a ↔ ∀ (i : ι), f i < a

tactic: simp only [comp_apply, succ_le_iff]
state_before: case h.e'_2.h.a
α : Type ?u.318577
β : Type ?u.318580
γ : Type ?u.318583
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u
f : ι → Ordinal
a : Ordinal
a✝ : ι
⊢ f a✝ < a ↔ (succ ∘ f) a✝ ≤ a
Theorem: CategoryTheory.Yoneda.obj_map_id
File: Mathlib/CategoryTheory/Yoneda.lean

tactic: dsimp
state_before: C : Type u₁
inst✝ : Category C
X Y : C
f : X.op ⟶ Y.op
⊢ (yoneda.obj X).map f (𝟙 X) = (yoneda.map f.unop).app Y.op (𝟙 Y)

tactic: simp
state_before: C : Type u₁
inst✝ : Category C
X Y : C
f : X.op ⟶ Y.op
⊢ f.unop ≫ 𝟙 X = 𝟙 Y ≫ f.unop
Theorem: Ordinal.smul_eq_mul
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [zero_smul, Nat.cast_zero, mul_zero]
state_before: α : Type ?u.222044
β : Type ?u.222047
γ : Type ?u.222050
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal
⊢ 0 • a = a * ↑0

tactic: rw [succ_nsmul', Nat.cast_add, mul_add, Nat.cast_one, mul_one, smul_eq_mul n]
state_before: α : Type ?u.222044
β : Type ?u.222047
γ : Type ?u.222050
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
n : ℕ
a : Ordinal
⊢ (n + 1) • a = a * ↑(n + 1)
Theorem: MeasureTheory.L1.setToL1_smul
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: rw [setToL1_eq_setToL1' hT h_smul, setToL1_eq_setToL1' hT h_smul]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1167772
G : Type ?u.1167775
𝕜 : Type u_4
p : ℝ≥0∞
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace ℝ F
inst✝⁶ : NormedAddCommGroup F'
inst✝⁵ : NormedSpace ℝ F'
inst✝⁴ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace 𝕜 F
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
hT : DominatedFinMeasAdditive μ T C
h_smul : ∀ (c : 𝕜) (s : Set α) (x : E), ↑(T s) (c • x) = c • ↑(T s) x
c : 𝕜
f : { x // x ∈ Lp E 1 }
⊢ ↑(setToL1 hT) (c • f) = c • ↑(setToL1 hT) f

tactic: exact ContinuousLinearMap.map_smul _ _ _
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1167772
G : Type ?u.1167775
𝕜 : Type u_4
p : ℝ≥0∞
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace ℝ F
inst✝⁶ : NormedAddCommGroup F'
inst✝⁵ : NormedSpace ℝ F'
inst✝⁴ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace 𝕜 F
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
hT : DominatedFinMeasAdditive μ T C
h_smul : ∀ (c : 𝕜) (s : Set α) (x : E), ↑(T s) (c • x) = c • ↑(T s) x
c : 𝕜
f : { x // x ∈ Lp E 1 }
⊢ ↑(setToL1' 𝕜 hT h_smul) (c • f) = c • ↑(setToL1' 𝕜 hT h_smul) f
Theorem: Equiv.Perm.prod_comp
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: convert (prod_map s σ.toEmbedding f).symm
state_before: ι : Type ?u.291257
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
σ : Equiv.Perm α
s : Finset α
f : α → β
hs : {a | ↑σ a ≠ a} ⊆ ↑s
⊢ ∏ x in s, f (↑σ x) = ∏ x in s, f x

tactic: exact (map_perm hs).symm
state_before: case h.e'_3.h
ι : Type ?u.291257
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
σ : Equiv.Perm α
s : Finset α
f : α → β
hs : {a | ↑σ a ≠ a} ⊆ ↑s
⊢ s = map (Equiv.toEmbedding σ) s
Theorem: Fintype.not_linearIndependent_iff
File: Mathlib/LinearAlgebra/LinearIndependent.lean

tactic: simpa using not_iff_not.2 Fintype.linearIndependent_iff
state_before: ι : Type u'
ι' : Type ?u.61943
R : Type u_1
K : Type ?u.61949
M : Type u_2
M' : Type ?u.61955
M'' : Type ?u.61958
V : Type u
V' : Type ?u.61963
v : ι → M
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
a b : R
x y : M
inst✝ : Fintype ι
⊢ ¬LinearIndependent R v ↔ ∃ g, ∑ i : ι, g i • v i = 0 ∧ ∃ i, g i ≠ 0
Theorem: List.destutter'_is_chain
File: Mathlib/Data/List/Destutter.lean

tactic: rw [destutter']
state_before: α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b✝ c : α
l : List α
a b : α
h : R a b
⊢ Chain R a (destutter' R b (c :: l))

tactic: split_ifs with hbc
state_before: α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b✝ c : α
l : List α
a b : α
h : R a b
⊢ Chain R a (if R b c then b :: destutter' R c l else destutter' R b l)

tactic: rw [chain_cons]
state_before: case inl
α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b✝ c : α
l : List α
a b : α
h : R a b
hbc : R b c
⊢ Chain R a (b :: destutter' R c l)

tactic: exact ⟨h, destutter'_is_chain l hbc⟩
state_before: case inl
α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b✝ c : α
l : List α
a b : α
h : R a b
hbc : R b c
⊢ R a b ∧ Chain R b (destutter' R c l)

tactic: exact destutter'_is_chain l h
state_before: case inr
α : Type u_1
l✝ : List α
R : α → α → Prop
inst✝ : DecidableRel R
a✝ b✝ c : α
l : List α
a b : α
h : R a b
hbc : ¬R b c
⊢ Chain R a (destutter' R b l)
Theorem: Units.inv_eq_self_iff
File: Mathlib/Algebra/Ring/Commute.lean

tactic: rw [inv_eq_iff_mul_eq_one]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
u : Rˣ
⊢ u⁻¹ = u ↔ u = 1 ∨ u = -1

tactic: simp only [ext_iff]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
u : Rˣ
⊢ u * u = 1 ↔ u = 1 ∨ u = -1

tactic: push_cast
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
u : Rˣ
⊢ ↑(u * u) = ↑1 ↔ ↑u = ↑1 ∨ ↑u = ↑(-1)

tactic: exact mul_self_eq_one_iff
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
u : Rˣ
⊢ ↑u * ↑u = 1 ↔ ↑u = 1 ∨ ↑u = -1
Theorem: SimpleGraph.neighborFinset_eq_filter
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext
state_before: ι : Sort ?u.282568
𝕜 : Type ?u.282571
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w : V
e : Sym2 V
inst✝¹ : Fintype V
v : V
inst✝ : DecidableRel G.Adj
⊢ neighborFinset G v = filter (Adj G v) univ

tactic: simp
state_before: case a
ι : Sort ?u.282568
𝕜 : Type ?u.282571
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w : V
e : Sym2 V
inst✝¹ : Fintype V
v : V
inst✝ : DecidableRel G.Adj
a✝ : V
⊢ a✝ ∈ neighborFinset G v ↔ a✝ ∈ filter (Adj G v) univ
Theorem: List.eq_nil_of_map_eq_nil
File: Mathlib/Data/List/Basic.lean

tactic: rw [← length_map l f, h]
state_before: ι : Type ?u.133209
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → β
l : List α
h : map f l = []
⊢ length l = 0

tactic: rfl
state_before: ι : Type ?u.133209
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → β
l : List α
h : map f l = []
⊢ length [] = 0
Theorem: IsFractionRing.lift_mk'
File: Mathlib/RingTheory/Localization/FractionRing.lean

tactic: simp only [mk'_eq_div, map_div₀, lift_algebraMap]
state_before: R : Type ?u.303281
inst✝¹¹ : CommRing R
M : Submonoid R
S : Type ?u.303473
inst✝¹⁰ : CommRing S
inst✝⁹ : Algebra R S
P : Type ?u.303710
inst✝⁸ : CommRing P
A : Type u_1
inst✝⁷ : CommRing A
inst✝⁶ : IsDomain A
K : Type u_3
B : Type ?u.303893
inst✝⁵ : CommRing B
inst✝⁴ : IsDomain B
inst✝³ : Field K
L : Type u_2
inst✝² : Field L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
g : A →+* L
hg : Injective ↑g
x : A
y : { x // x ∈ nonZeroDivisors A }
⊢ ↑(lift hg) (mk' K x y) = ↑g x / ↑g ↑y
Theorem: ball_one_eq
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simp
state_before: 𝓕 : Type ?u.90953
𝕜 : Type ?u.90956
α : Type ?u.90959
ι : Type ?u.90962
κ : Type ?u.90965
E : Type u_1
F : Type ?u.90971
G : Type ?u.90974
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a✝ a₁ a₂ b b₁ b₂ : E
r✝ r₁ r₂ r : ℝ
a : E
⊢ a ∈ ball 1 r ↔ a ∈ {x | ‖x‖ < r}
Theorem: Polynomial.zero_scaleRoots
File: Mathlib/RingTheory/Polynomial/ScaleRoots.lean

tactic: ext
state_before: A : Type ?u.24205
K : Type ?u.24208
R : Type u_1
S : Type ?u.24214
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
s : R
⊢ scaleRoots 0 s = 0

tactic: simp
state_before: case a
A : Type ?u.24205
K : Type ?u.24208
R : Type u_1
S : Type ?u.24214
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
s : R
n✝ : ℕ
⊢ coeff (scaleRoots 0 s) n✝ = coeff 0 n✝
Theorem: Set.neg_mem_centralizer
File: Mathlib/GroupTheory/Subsemigroup/Centralizer.lean

tactic: rw [mul_neg, ha c hc, neg_mul]
state_before: M : Type u_1
S T : Set M
a b : M
inst✝¹ : Mul M
inst✝ : HasDistribNeg M
ha : a ∈ centralizer S
c : M
hc : c ∈ S
⊢ c * -a = -a * c
Theorem: PFunctor.M.iselect_nil
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: rfl
state_before: F : PFunctor
X : Type ?u.28622
f✝ : X → Obj F X
inst✝¹ : DecidableEq F.A
inst✝ : Inhabited (M F)
a : F.A
f : B F a → M F
⊢ iselect [] (M.mk { fst := a, snd := f }) = a
Theorem: AffineSubspace.mem_map
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: simpa only [bex_def] using mem_image_iff_bex
state_before: k : Type u_1
V₁ : Type u_2
P₁ : Type u_3
V₂ : Type u_4
P₂ : Type u_5
V₃ : Type ?u.542331
P₃ : Type ?u.542334
inst✝⁹ : Ring k
inst✝⁸ : AddCommGroup V₁
inst✝⁷ : Module k V₁
inst✝⁶ : AffineSpace V₁ P₁
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module k V₂
inst✝³ : AffineSpace V₂ P₂
inst✝² : AddCommGroup V₃
inst✝¹ : Module k V₃
inst✝ : AffineSpace V₃ P₃
f✝ f : P₁ →ᵃ[k] P₂
x : P₂
s : AffineSubspace k P₁
⊢ x ∈ map f s ↔ ∃ y, y ∈ s ∧ ↑f y = x
Theorem: AdjoinRoot.minpoly_powerBasis_gen
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: rw [powerBasis_gen, minpoly_root hf]
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
g : R[X]
inst✝ : Field K
f : K[X]
hf : f ≠ 0
⊢ minpoly K (powerBasis hf).gen = f * ↑C (Polynomial.leadingCoeff f)⁻¹
Theorem: segment_same
File: Mathlib/Analysis/Convex/Segment.lean

tactic: simpa only [(add_smul _ _ _).symm, mem_singleton_iff, hab, one_smul, eq_comm] using hz
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.36800
G : Type ?u.36803
ι : Type ?u.36806
π : ι → Type ?u.36811
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : Module 𝕜 E
s : Set E
x✝¹ y z✝ x z : E
x✝ : z ∈ [x-[𝕜]x]
a b : 𝕜
w✝¹ : 0 ≤ a
w✝ : 0 ≤ b
hab : a + b = 1
hz : a • x + b • x = z
⊢ z ∈ {x}
Theorem: Hyperreal.infiniteNeg_add_not_infinitePos
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rw [← infinitePos_neg, ← infinitePos_neg, ← @infiniteNeg_neg y, neg_add]
state_before: x y : ℝ*
⊢ InfiniteNeg x → ¬InfinitePos y → InfiniteNeg (x + y)

tactic: exact infinitePos_add_not_infiniteNeg
state_before: x y : ℝ*
⊢ InfinitePos (-x) → ¬InfiniteNeg (-y) → InfinitePos (-x + -y)
Theorem: CauSeq.Completion.inv_mul_cancel
File: Mathlib/Data/Real/CauSeqCompletion.lean

tactic: simp only [mk_eq_mk, ne_eq, mk_eq_zero] at hf
state_before: α : Type u_1
inst✝² : LinearOrderedField α
β : Type u_2
inst✝¹ : DivisionRing β
abv : β → α
inst✝ : IsAbsoluteValue abv
x : Cauchy abv
f : CauSeq β abv
hf : Quotient.mk equiv f ≠ 0
⊢ (Quotient.mk equiv f)⁻¹ * Quotient.mk equiv f = 1

tactic: simp [hf]
state_before: α : Type u_1
inst✝² : LinearOrderedField α
β : Type u_2
inst✝¹ : DivisionRing β
abv : β → α
inst✝ : IsAbsoluteValue abv
x : Cauchy abv
f : CauSeq β abv
hf : ¬LimZero f
⊢ (Quotient.mk equiv f)⁻¹ * Quotient.mk equiv f = 1

tactic: exact Quotient.sound (CauSeq.inv_mul_cancel hf)
state_before: α : Type u_1
inst✝² : LinearOrderedField α
β : Type u_2
inst✝¹ : DivisionRing β
abv : β → α
inst✝ : IsAbsoluteValue abv
x : Cauchy abv
f : CauSeq β abv
hf : ¬LimZero f
⊢ mk (inv f (_ : ¬LimZero f) * f) = 1