tasksource/leandojo huggingface dataset:
Theorem: Ideal.torsionOf_eq_bot_iff_of_noZeroSMulDivisors
File: Mathlib/Algebra/Module/Torsion.lean

tactic: refine' ⟨fun h contra => _, fun h => (Submodule.eq_bot_iff _).mpr fun r hr => _⟩
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : Nontrivial R
inst✝ : NoZeroSMulDivisors R M
m : M
⊢ torsionOf R M m = ⊥ ↔ m ≠ 0

tactic: rw [contra, torsionOf_zero] at h
state_before: case refine'_1
R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : Nontrivial R
inst✝ : NoZeroSMulDivisors R M
m : M
h : torsionOf R M m = ⊥
contra : m = 0
⊢ False

tactic: exact bot_ne_top.symm h
state_before: case refine'_1
R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : Nontrivial R
inst✝ : NoZeroSMulDivisors R M
m : M
h : ⊤ = ⊥
contra : m = 0
⊢ False

tactic: rw [mem_torsionOf_iff, smul_eq_zero] at hr
state_before: case refine'_2
R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : Nontrivial R
inst✝ : NoZeroSMulDivisors R M
m : M
h : m ≠ 0
r : R
hr : r ∈ torsionOf R M m
⊢ r = 0

tactic: tauto
state_before: case refine'_2
R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : Nontrivial R
inst✝ : NoZeroSMulDivisors R M
m : M
h : m ≠ 0
r : R
hr : r = 0 ∨ m = 0
⊢ r = 0
Theorem: intervalIntegral.integral_comp_neg
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: simpa only [zero_sub] using integral_comp_sub_left f 0
state_before: ι : Type ?u.14960858
𝕜 : Type ?u.14960861
E : Type u_1
F : Type ?u.14960867
A : Type ?u.14960870
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b c d : ℝ
f : ℝ → E
⊢ (∫ (x : ℝ) in a..b, f (-x)) = ∫ (x : ℝ) in -b..-a, f x
Theorem: Submodule.linearProjOfIsCompl_apply_eq_zero_iff
File: Mathlib/LinearAlgebra/Projection.lean

tactic: simp [linearProjOfIsCompl]
state_before: R : Type u_2
inst✝⁹ : Ring R
E : Type u_1
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type ?u.146879
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type ?u.147395
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
p q : Submodule R E
S : Type ?u.148358
inst✝² : Semiring S
M : Type ?u.148364
inst✝¹ : AddCommMonoid M
inst✝ : Module S M
m : Submodule S M
h : IsCompl p q
x : E
⊢ ↑(linearProjOfIsCompl p q h) x = 0 ↔ x ∈ q
Theorem: Ideal.IsPrime.mul_mem_iff_mem_or_mem
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rintro (h | h)
state_before: α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
I✝ I : Ideal α
hI : IsPrime I
x y : α
⊢ x ∈ I ∨ y ∈ I → x * y ∈ I

tactic: exacts [I.mul_mem_right y h, I.mul_mem_left x h]
state_before: case inl
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
I✝ I : Ideal α
hI : IsPrime I
x y : α
h : x ∈ I
⊢ x * y ∈ I

case inr
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
I✝ I : Ideal α
hI : IsPrime I
x y : α
h : y ∈ I
⊢ x * y ∈ I
Theorem: Nat.mul_div_mul_left
File: Std/Data/Nat/Lemmas.lean

tactic: rw [← Nat.div_div_eq_div_mul, Nat.mul_div_cancel_left _ H]
state_before: m n k : Nat
H : 0 < m
⊢ m * n / (m * k) = n / k
Theorem: Std.BinomialHeapImp.Heap.WellFormed.findMin
File: Std/Data/BinomialHeap.lean

tactic: let ⟨h₁, h₂, h₃⟩ := h
state_before: α : Type u_1
le : α → α → Bool
n : Nat
k : Heap α → Heap α
res : FindMin α
s✝ : Heap α
hr : FindMin.WellFormed le res
hk : ∀ {s : Heap α}, WellFormed le n s → WellFormed le 0 (k s)
r : Nat
a : α
c : HeapNode α
s : Heap α
h : WellFormed le n (cons r a c s)
⊢ Nonempty (FindMin.WellFormed le (Heap.findMin le k (cons r a c s) res))

tactic: simp [Heap.findMin]
state_before: α : Type u_1
le : α → α → Bool
n : Nat
k : Heap α → Heap α
res : FindMin α
s✝ : Heap α
hr : FindMin.WellFormed le res
hk : ∀ {s : Heap α}, WellFormed le n s → WellFormed le 0 (k s)
r : Nat
a : α
c : HeapNode α
s : Heap α
h : WellFormed le n (cons r a c s)
h₁ : n ≤ r
h₂ : HeapNode.WellFormed le a c r
h₃ : WellFormed le (r + 1) s
⊢ Nonempty (FindMin.WellFormed le (Heap.findMin le k (cons r a c s) res))

tactic: split
state_before: α : Type u_1
le : α → α → Bool
n : Nat
k : Heap α → Heap α
res : FindMin α
s✝ : Heap α
hr : FindMin.WellFormed le res
hk : ∀ {s : Heap α}, WellFormed le n s → WellFormed le 0 (k s)
r : Nat
a : α
c : HeapNode α
s : Heap α
h : WellFormed le n (cons r a c s)
h₁ : n ≤ r
h₂ : HeapNode.WellFormed le a c r
h₃ : WellFormed le (r + 1) s
⊢ Nonempty
    (FindMin.WellFormed le
      (Heap.findMin le (k ∘ cons r a c) s
        (if le res.val a = true then res else { before := k, val := a, node := c, next := s })))

tactic: exact findMin h₃ hr (fun h => hk ⟨h₁, h₂, h⟩)
state_before: case inl
α : Type u_1
le : α → α → Bool
n : Nat
k : Heap α → Heap α
res : FindMin α
s✝ : Heap α
hr : FindMin.WellFormed le res
hk : ∀ {s : Heap α}, WellFormed le n s → WellFormed le 0 (k s)
r : Nat
a : α
c : HeapNode α
s : Heap α
h : WellFormed le n (cons r a c s)
h₁ : n ≤ r
h₂ : HeapNode.WellFormed le a c r
h₃ : WellFormed le (r + 1) s
h✝ : le res.val a = true
⊢ Nonempty (FindMin.WellFormed le (Heap.findMin le (k ∘ cons r a c) s res))

tactic: exact findMin h₃ ⟨_, fun h => hk (h.of_le h₁), h₂, h₃⟩ (fun h => hk ⟨h₁, h₂, h⟩)
state_before: case inr
α : Type u_1
le : α → α → Bool
n : Nat
k : Heap α → Heap α
res : FindMin α
s✝ : Heap α
hr : FindMin.WellFormed le res
hk : ∀ {s : Heap α}, WellFormed le n s → WellFormed le 0 (k s)
r : Nat
a : α
c : HeapNode α
s : Heap α
h : WellFormed le n (cons r a c s)
h₁ : n ≤ r
h₂ : HeapNode.WellFormed le a c r
h₃ : WellFormed le (r + 1) s
h✝ : ¬le res.val a = true
⊢ Nonempty (FindMin.WellFormed le (Heap.findMin le (k ∘ cons r a c) s { before := k, val := a, node := c, next := s }))
Theorem: Metric.exists_mem_closure_infDist_eq_dist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simpa only [infDist_closure] using isClosed_closure.exists_infDist_eq_dist hne.closure x
state_before: ι : Sort ?u.70605
α : Type u
β : Type v
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
s t u : Set α
x✝ y : α
Φ : α → β
inst✝ : ProperSpace α
hne : Set.Nonempty s
x : α
⊢ ∃ y, y ∈ closure s ∧ infDist x s = dist x y
Theorem: Set.Nonempty.cSup_mem
File: Mathlib/Order/ConditionallyCompleteLattice/Finset.lean

tactic: lift s to Finset α using hs
state_before: α : Type u_1
β : Type ?u.9542
γ : Type ?u.9545
inst✝ : ConditionallyCompleteLinearOrder α
s t : Set α
a b : α
h : Set.Nonempty s
hs : Set.Finite s
⊢ sSup s ∈ s

tactic: exact Finset.Nonempty.cSup_mem h
state_before: case intro
α : Type u_1
β : Type ?u.9542
γ : Type ?u.9545
inst✝ : ConditionallyCompleteLinearOrder α
t : Set α
a b : α
s : Finset α
h : Set.Nonempty ↑s
⊢ sSup ↑s ∈ ↑s
Theorem: Qpf.Fix.dest_mk
File: Mathlib/Data/QPF/Univariate/Basic.lean

tactic: unfold Fix.dest
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
⊢ dest (mk x) = x

tactic: rw [Fix.rec_eq, ← Fix.dest, ← comp_map]
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
⊢ rec (Functor.map mk) (mk x) = x

tactic: conv =>
  rhs
  rw [← id_map x]
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
⊢ (mk ∘ dest) <$> x = x

tactic: congr with x
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : F (Fix F)
⊢ (mk ∘ dest) <$> x = id <$> x

tactic: apply Fix.mk_dest
state_before: case e_a.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x✝ : F (Fix F)
x : Fix F
⊢ (mk ∘ dest) x = id x
Theorem: Bool.and_xor_distrib_right
File: Mathlib/Data/Bool/Basic.lean

tactic: cases a <;> cases b <;> cases c <;> simp
state_before: a b c : Bool
⊢ (xor a b && c) = xor (a && c) (b && c)
Theorem: List.mem_range'
File: Std/Data/List/Lemmas.lean

tactic: simp [range', Nat.not_lt_zero]
state_before: m s step : Nat
⊢ m ∈ range' s 0 step ↔ ∃ i, i < 0 ∧ m = s + step * i

tactic: have h (i) : i ≤ n ↔ i = 0 ∨ ∃ j, i = succ j ∧ j < n := by cases i <;> simp [Nat.succ_le]
state_before: m s step n : Nat
⊢ m ∈ range' s (n + 1) step ↔ ∃ i, i < n + 1 ∧ m = s + step * i

tactic: simp [range', mem_range', Nat.lt_succ, h]
state_before: m s step n : Nat
h : ∀ (i : Nat), i ≤ n ↔ i = 0 ∨ ∃ j, i = succ j ∧ j < n
⊢ m ∈ range' s (n + 1) step ↔ ∃ i, i < n + 1 ∧ m = s + step * i

tactic: simp only [← exists_and_right, and_assoc]
state_before: m s step n : Nat
h : ∀ (i : Nat), i ≤ n ↔ i = 0 ∨ ∃ j, i = succ j ∧ j < n
⊢ (m = s ∨ ∃ i, i < n ∧ m = s + step + step * i) ↔ m = s ∨ ∃ a, (∃ j, a = succ j ∧ j < n) ∧ m = s + step * a

tactic: rw [exists_comm]
state_before: m s step n : Nat
h : ∀ (i : Nat), i ≤ n ↔ i = 0 ∨ ∃ j, i = succ j ∧ j < n
⊢ (m = s ∨ ∃ i, i < n ∧ m = s + step + step * i) ↔ m = s ∨ ∃ a x, a = succ x ∧ x < n ∧ m = s + step * a

tactic: simp [Nat.mul_succ, Nat.add_assoc, Nat.add_comm]
state_before: m s step n : Nat
h : ∀ (i : Nat), i ≤ n ↔ i = 0 ∨ ∃ j, i = succ j ∧ j < n
⊢ (m = s ∨ ∃ i, i < n ∧ m = s + step + step * i) ↔ m = s ∨ ∃ b a, a = succ b ∧ b < n ∧ m = s + step * a

tactic: cases i <;> simp [Nat.succ_le]
state_before: m s step n i : Nat
⊢ i ≤ n ↔ i = 0 ∨ ∃ j, i = succ j ∧ j < n
Theorem: Directed.iSup_inf_eq
File: Mathlib/Order/CompactlyGenerated.lean

tactic: rw [iSup, h.directedOn_range.sSup_inf_eq, iSup_range]
state_before: ι : Sort u_2
α : Type u_1
inst✝² : CompleteLattice α
f : ι → α
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
a b : α
s : Set α
h : Directed (fun x x_1 => x ≤ x_1) f
⊢ (⨆ (i : ι), f i) ⊓ a = ⨆ (i : ι), f i ⊓ a
Theorem: Equiv.Perm.partition_eq_of_isConj
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: rw [isConj_iff_cycleType_eq]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ τ : Perm α
⊢ IsConj σ τ ↔ partition σ = partition τ

tactic: refine' ⟨fun h => _, fun h => _⟩
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ τ : Perm α
⊢ cycleType σ = cycleType τ ↔ partition σ = partition τ

tactic: rw [Nat.Partition.ext_iff, parts_partition, parts_partition, ← sum_cycleType, ← sum_cycleType,
  h]
state_before: case refine'_1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ τ : Perm α
h : cycleType σ = cycleType τ
⊢ partition σ = partition τ

tactic: rw [← filter_parts_partition_eq_cycleType, ← filter_parts_partition_eq_cycleType, h]
state_before: case refine'_2
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ τ : Perm α
h : partition σ = partition τ
⊢ cycleType σ = cycleType τ
Theorem: Set.image_diff_preimage
File: Mathlib/Data/Set/Image.lean

tactic: simp_rw [diff_eq, ← preimage_compl, image_inter_preimage]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.52978
ι : Sort ?u.52981
ι' : Sort ?u.52984
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s : Set α
t : Set β
⊢ f '' (s \ f ⁻¹' t) = f '' s \ t
Theorem: Real.rpow_add_one
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: simpa using rpow_add_nat hx y 1
state_before: x✝ y✝ z x : ℝ
hx : x ≠ 0
y : ℝ
⊢ x ^ (y + 1) = x ^ y * x
Theorem: Cubic.of_c_eq_zero
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: rw [of_b_eq_zero ha hb, hc, C_0, MulZeroClass.zero_mul, zero_add]
state_before: R : Type u_1
S : Type ?u.507248
F : Type ?u.507251
K : Type ?u.507254
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
ha : P.a = 0
hb : P.b = 0
hc : P.c = 0
⊢ toPoly P = ↑C P.d
Theorem: UInt16.sizeOf
File: src/lean/Init/SizeOfLemmas.lean

tactic: cases a
state_before: a : UInt16
⊢ SizeOf.sizeOf a = toNat a + 2

tactic: simp_arith [UInt16.toNat]
state_before: case mk
val✝ : Fin size
⊢ SizeOf.sizeOf { val := val✝ } = toNat { val := val✝ } + 2
Theorem: UpperSet.prod_eq_top
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp_rw [SetLike.ext'_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.176800
ι : Sort ?u.176803
κ : ι → Sort ?u.176808
inst✝¹ : Preorder α
inst✝ : Preorder β
s s₁ s₂ : UpperSet α
t t₁ t₂ : UpperSet β
x : α × β
⊢ s ×ˢ t = ⊤ ↔ s = ⊤ ∨ t = ⊤

tactic: exact prod_eq_empty_iff
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.176800
ι : Sort ?u.176803
κ : ι → Sort ?u.176808
inst✝¹ : Preorder α
inst✝ : Preorder β
s s₁ s₂ : UpperSet α
t t₁ t₂ : UpperSet β
x : α × β
⊢ ↑(s ×ˢ t) = ↑⊤ ↔ ↑s = ↑⊤ ∨ ↑t = ↑⊤
Theorem: Multiset.prod_eq_zero_iff
File: Mathlib/Algebra/BigOperators/Multiset/Basic.lean

tactic: rw [quot_mk_to_coe, coe_prod]
state_before: ι : Type ?u.90765
α : Type u_1
β : Type ?u.90771
γ : Type ?u.90774
inst✝² : CommMonoidWithZero α
inst✝¹ : NoZeroDivisors α
inst✝ : Nontrivial α
s : Multiset α
l : List α
⊢ prod (Quotient.mk (List.isSetoid α) l) = 0 ↔ 0 ∈ Quotient.mk (List.isSetoid α) l

tactic: exact List.prod_eq_zero_iff
state_before: ι : Type ?u.90765
α : Type u_1
β : Type ?u.90771
γ : Type ?u.90774
inst✝² : CommMonoidWithZero α
inst✝¹ : NoZeroDivisors α
inst✝ : Nontrivial α
s : Multiset α
l : List α
⊢ List.prod l = 0 ↔ 0 ∈ ↑l
Theorem: Real.tan_neg
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [tan, neg_div]
state_before: x y : ℝ
⊢ tan (-x) = -tan x
Theorem: Ideal.isIdempotentElem_iff_of_fg
File: Mathlib/RingTheory/Ideal/IdempotentFG.lean

tactic: constructor
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
⊢ IsIdempotentElem I ↔ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}

tactic: intro e
state_before: case mp
R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
⊢ IsIdempotentElem I → ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}

tactic: obtain ⟨r, hr, hr'⟩ :=
  Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I I h
    (by
      rw [smul_eq_mul]
      exact e.ge)
state_before: case mp
R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
e : IsIdempotentElem I
⊢ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}

tactic: simp_rw [smul_eq_mul] at hr'
state_before: case mp.intro.intro
R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
e : IsIdempotentElem I
r : R
hr : r ∈ I
hr' : ∀ (n : R), n ∈ I → r • n = n
⊢ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}

tactic: refine' ⟨r, hr' r hr, antisymm _ ((Submodule.span_singleton_le_iff_mem _ _).mpr hr)⟩
state_before: case mp.intro.intro
R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
e : IsIdempotentElem I
r : R
hr : r ∈ I
hr' : ∀ (n : R), n ∈ I → r * n = n
⊢ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}

tactic: intro x hx
state_before: case mp.intro.intro
R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
e : IsIdempotentElem I
r : R
hr : r ∈ I
hr' : ∀ (n : R), n ∈ I → r * n = n
⊢ I ≤ Submodule.span R {r}

tactic: rw [← hr' x hx]
state_before: case mp.intro.intro
R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
e : IsIdempotentElem I
r : R
hr : r ∈ I
hr' : ∀ (n : R), n ∈ I → r * n = n
x : R
hx : x ∈ I
⊢ x ∈ Submodule.span R {r}

tactic: exact Ideal.mem_span_singleton'.mpr ⟨_, mul_comm _ _⟩
state_before: case mp.intro.intro
R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
e : IsIdempotentElem I
r : R
hr : r ∈ I
hr' : ∀ (n : R), n ∈ I → r * n = n
x : R
hx : x ∈ I
⊢ r * x ∈ Submodule.span R {r}

tactic: rw [smul_eq_mul]
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
e : IsIdempotentElem I
⊢ I ≤ I • I

tactic: exact e.ge
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
e : IsIdempotentElem I
⊢ I ≤ I * I

tactic: rintro ⟨e, he, rfl⟩
state_before: case mpr
R : Type u_1
inst✝ : CommRing R
I : Ideal R
h : FG I
⊢ (∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}) → IsIdempotentElem I

tactic: simp [IsIdempotentElem, Ideal.span_singleton_mul_span_singleton, he.eq]
state_before: case mpr.intro.intro
R : Type u_1
inst✝ : CommRing R
e : R
he : IsIdempotentElem e
h : FG (Submodule.span R {e})
⊢ IsIdempotentElem (Submodule.span R {e})
Theorem: ZFSet.nonempty_mk_iff
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: refine' ⟨_, fun ⟨a, h⟩ => ⟨mk a, h⟩⟩
state_before: x : PSet
⊢ ZFSet.Nonempty (mk x) ↔ PSet.Nonempty x

tactic: rintro ⟨a, h⟩
state_before: x : PSet
⊢ ZFSet.Nonempty (mk x) → PSet.Nonempty x

tactic: induction a using Quotient.inductionOn
state_before: case intro
x : PSet
a : ZFSet
h : a ∈ toSet (mk x)
⊢ PSet.Nonempty x

tactic: exact ⟨_, h⟩
state_before: case intro.h
x a✝ : PSet
h : Quotient.mk setoid a✝ ∈ toSet (mk x)
⊢ PSet.Nonempty x
Theorem: SimpleGraph.commonNeighbors_top_eq
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext u
state_before: ι : Sort ?u.148498
𝕜 : Type ?u.148501
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
v w : V
⊢ commonNeighbors ⊤ v w = Set.univ \ {v, w}

tactic: simp [commonNeighbors, eq_comm, not_or]
state_before: case h
ι : Sort ?u.148498
𝕜 : Type ?u.148501
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
v w u : V
⊢ u ∈ commonNeighbors ⊤ v w ↔ u ∈ Set.univ \ {v, w}
Theorem: Polynomial.natDegree_eq_reverse_natDegree_add_natTrailingDegree
File: Mathlib/Data/Polynomial/Reverse.lean

tactic: by_cases hf : f = 0
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
⊢ natDegree f = natDegree (reverse f) + natTrailingDegree f

tactic: apply le_antisymm
state_before: case neg
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ natDegree f = natDegree (reverse f) + natTrailingDegree f

tactic: rw [hf, reverse_zero, natDegree_zero, natTrailingDegree_zero]
state_before: case pos
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : f = 0
⊢ natDegree f = natDegree (reverse f) + natTrailingDegree f

tactic: refine' tsub_le_iff_right.mp _
state_before: case neg.a
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ natDegree f ≤ natDegree (reverse f) + natTrailingDegree f

tactic: apply le_natDegree_of_ne_zero
state_before: case neg.a
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ natDegree f - natTrailingDegree f ≤ natDegree (reverse f)

tactic: rw [reverse, coeff_reflect, ← revAt_le f.natTrailingDegree_le_natDegree, revAt_invol]
state_before: case neg.a.h
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ coeff (reverse f) (natDegree f - natTrailingDegree f) ≠ 0

tactic: exact trailingCoeff_nonzero_iff_nonzero.mpr hf
state_before: case neg.a.h
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ coeff f (natTrailingDegree f) ≠ 0

tactic: rw [← le_tsub_iff_left f.reverse_natDegree_le]
state_before: case neg.a
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ natDegree (reverse f) + natTrailingDegree f ≤ natDegree f

tactic: apply natTrailingDegree_le_of_ne_zero
state_before: case neg.a
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ natTrailingDegree f ≤ natDegree f - natDegree (reverse f)

tactic: have key := mt leadingCoeff_eq_zero.mp (mt reverse_eq_zero.mp hf)
state_before: case neg.a.h
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ coeff f (natDegree f - natDegree (reverse f)) ≠ 0

tactic: rwa [leadingCoeff, coeff_reverse, revAt_le f.reverse_natDegree_le] at key
state_before: case neg.a.h
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
key : ¬leadingCoeff (reverse f) = 0
⊢ coeff f (natDegree f - natDegree (reverse f)) ≠ 0
Theorem: Algebra.adjoin_adjoin_coe_preimage
File: Mathlib/RingTheory/Adjoin/Basic.lean

tactic: refine'
  eq_top_iff.2 fun x =>
    adjoin_induction' (p := fun y => y ∈ adjoin R (((↑) : adjoin R s → A) ⁻¹' s))
    (fun a ha => _) (fun r => _) (fun _ _ => _) (fun _ _ => _) x
state_before: R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
s✝ t s : Set A
⊢ adjoin R (Subtype.val ⁻¹' s) = ⊤

tactic: exact subset_adjoin ha
state_before: case refine'_1
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
s✝ t s : Set A
x : { x // x ∈ ↑(adjoin R s) }
a : A
ha : a ∈ s
⊢ (fun y => y ∈ adjoin R (Subtype.val ⁻¹' s)) { val := a, property := (_ : a ∈ ↑(adjoin R s)) }

tactic: exact Subalgebra.algebraMap_mem _ r
state_before: case refine'_2
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
s✝ t s : Set A
x : { x // x ∈ ↑(adjoin R s) }
r : R
⊢ (fun y => y ∈ adjoin R (Subtype.val ⁻¹' s)) (↑(algebraMap R { x // x ∈ adjoin R s }) r)

tactic: exact Subalgebra.add_mem _
state_before: case refine'_3
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
s✝ t s : Set A
x : { x // x ∈ ↑(adjoin R s) }
x✝¹ x✝ : { x // x ∈ adjoin R s }
⊢ (fun y => y ∈ adjoin R (Subtype.val ⁻¹' s)) x✝¹ →
    (fun y => y ∈ adjoin R (Subtype.val ⁻¹' s)) x✝ → (fun y => y ∈ adjoin R (Subtype.val ⁻¹' s)) (x✝¹ + x✝)

tactic: exact Subalgebra.mul_mem _
state_before: case refine'_4
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
s✝ t s : Set A
x : { x // x ∈ ↑(adjoin R s) }
x✝¹ x✝ : { x // x ∈ adjoin R s }
⊢ (fun y => y ∈ adjoin R (Subtype.val ⁻¹' s)) x✝¹ →
    (fun y => y ∈ adjoin R (Subtype.val ⁻¹' s)) x✝ → (fun y => y ∈ adjoin R (Subtype.val ⁻¹' s)) (x✝¹ * x✝)
Theorem: LieAlgebra.lieCharacter_apply_of_mem_derived
File: Mathlib/Algebra/Lie/Character.lean

tactic: rw [derivedSeries_def, derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_zero, ←
  LieSubmodule.mem_coeSubmodule, LieSubmodule.lieIdeal_oper_eq_linear_span] at h
state_before: R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ derivedSeries R L 1
⊢ ↑χ x = 0

tactic: refine' Submodule.span_induction h _ _ _ _
state_before: R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ↑χ x = 0

tactic: rintro y ⟨⟨z, hz⟩, ⟨⟨w, hw⟩, rfl⟩⟩
state_before: case refine'_1
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ∀ (x : L), x ∈ {m | ∃ x n, ⁅↑x, ↑n⁆ = m} → ↑χ x = 0

tactic: apply lieCharacter_apply_lie
state_before: case refine'_1.intro.mk.intro.mk
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
z : L
hz : z ∈ ⊤
w : L
hw : w ∈ ⊤
⊢ ↑χ ⁅↑{ val := z, property := hz }, ↑{ val := w, property := hw }⁆ = 0

tactic: exact χ.map_zero
state_before: case refine'_2
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ↑χ 0 = 0

tactic: intro y z hy hz
state_before: case refine'_3
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ∀ (x y : L), ↑χ x = 0 → ↑χ y = 0 → ↑χ (x + y) = 0

tactic: rw [LieHom.map_add, hy, hz, add_zero]
state_before: case refine'_3
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
y z : L
hy : ↑χ y = 0
hz : ↑χ z = 0
⊢ ↑χ (y + z) = 0

tactic: intro t y hy
state_before: case refine'_4
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ∀ (a : R) (x : L), ↑χ x = 0 → ↑χ (a • x) = 0

tactic: rw [LieHom.map_smul, hy, smul_zero]
state_before: case refine'_4
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
t : R
y : L
hy : ↑χ y = 0
⊢ ↑χ (t • y) = 0
Theorem: differentiableOn_add_const_iff
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

tactic: simpa using h.add_const (-c)
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.214809
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.214904
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
c : F
h : DifferentiableOn 𝕜 (fun y => f y + c) s
⊢ DifferentiableOn 𝕜 f s