tasksource/leandojo huggingface dataset:
Theorem: List.get?_modifyNth
File: Std/Data/List/Lemmas.lean

tactic: cases l <;> cases n <;> rfl
state_before: α : Type u_1
f : α → α
n : Nat
l : List α
⊢ get? (modifyNth f n l) 0 = (fun a => if n = 0 then f a else a) <$> get? l 0

tactic: cases n <;> rfl
state_before: α : Type u_1
f : α → α
n n✝ : Nat
⊢ get? (modifyNth f n []) (n✝ + 1) = (fun a => if n = n✝ + 1 then f a else a) <$> get? [] (n✝ + 1)

tactic: cases l.get? m <;> rfl
state_before: α : Type u_1
f : α → α
head✝ : α
l : List α
m : Nat
⊢ get? (modifyNth f 0 (head✝ :: l)) (m + 1) = (fun a => if 0 = m + 1 then f a else a) <$> get? (head✝ :: l) (m + 1)

tactic: cases l.get? m <;> by_cases h : n = m <;>
  simp only [h, if_pos, if_true, if_false, Option.map, mt Nat.succ.inj, not_false_iff]
state_before: α : Type u_1
f : α → α
n : Nat
a : α
l : List α
m : Nat
⊢ (fun a => if n = m then f a else a) <$> get? l m =
    (fun a => if n + 1 = m + 1 then f a else a) <$> get? (a :: l) (m + 1)
Theorem: left_mem_segment
File: Mathlib/Analysis/Convex/Segment.lean

tactic: rw [zero_smul, one_smul, add_zero]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.28879
G : Type ?u.28882
ι : Type ?u.28885
π : ι → Type ?u.28890
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : MulActionWithZero 𝕜 E
x y : E
⊢ 1 • x + 0 • y = x
Theorem: toIcoMod_add_toIocMod_zero
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [toIcoMod_zero_sub_comm, sub_add_cancel]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoMod hp 0 (a - b) + toIocMod hp 0 (b - a) = p
Theorem: String.extract_of_valid
File: Std/Data/String/Lemmas.lean

tactic: simp only [extract]
state_before: l m r : List Char
⊢ extract { data := l ++ m ++ r } { byteIdx := utf8Len l } { byteIdx := utf8Len l + utf8Len m } = { data := m }

tactic: split
state_before: l m r : List Char
⊢ (if utf8Len l ≥ utf8Len l + utf8Len m then ""
    else { data := extract.go₁ (l ++ m ++ r) 0 { byteIdx := utf8Len l } { byteIdx := utf8Len l + utf8Len m } }) =
    { data := m }

tactic: next h => rw [utf8Len_eq_zero.1 <| Nat.le_zero.1 <| (Nat.add_le_add_iff_le_left _ _ 0).1 h]
state_before: case inl
l m r : List Char
h✝ : utf8Len l ≥ utf8Len l + utf8Len m
⊢ "" = { data := m }

tactic: rw [utf8Len_eq_zero.1 <| Nat.le_zero.1 <| (Nat.add_le_add_iff_le_left _ _ 0).1 h]
state_before: l m r : List Char
h : utf8Len l ≥ utf8Len l + utf8Len m
⊢ "" = { data := m }

tactic: congr
state_before: case inr
l m r : List Char
h✝ : ¬utf8Len l ≥ utf8Len l + utf8Len m
⊢ { data := extract.go₁ (l ++ m ++ r) 0 { byteIdx := utf8Len l } { byteIdx := utf8Len l + utf8Len m } } = { data := m }

tactic: rw [List.append_assoc, extract.go₁_append_right _ _ _ _ _ (by rfl)]
state_before: case inr.e_data
l m r : List Char
h✝ : ¬utf8Len l ≥ utf8Len l + utf8Len m
⊢ extract.go₁ (l ++ m ++ r) 0 { byteIdx := utf8Len l } { byteIdx := utf8Len l + utf8Len m } = m

tactic: apply extract.go₂_append_left
state_before: case inr.e_data
l m r : List Char
h✝ : ¬utf8Len l ≥ utf8Len l + utf8Len m
⊢ extract.go₂ (m ++ r) { byteIdx := utf8Len l } { byteIdx := utf8Len l + utf8Len m } = m

tactic: apply Nat.add_comm
state_before: case inr.e_data.a
l m r : List Char
h✝ : ¬utf8Len l ≥ utf8Len l + utf8Len m
⊢ utf8Len l + utf8Len m = utf8Len m + utf8Len l

tactic: rfl
state_before: l m r : List Char
h✝ : ¬utf8Len l ≥ utf8Len l + utf8Len m
⊢ utf8Len l = utf8Len l + 0.byteIdx
Theorem: bihimp_self
File: Mathlib/Order/SymmDiff.lean

tactic: rw [bihimp, inf_idem, himp_self]
state_before: ι : Type ?u.36681
α : Type u_1
β : Type ?u.36687
π : ι → Type ?u.36692
inst✝ : GeneralizedHeytingAlgebra α
a b c d : α
⊢ a ⇔ a = ⊤
Theorem: Polynomial.support_toSubring
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: ext i
state_before: R : Type u
S : Type ?u.88744
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
T : Subring R
hp : ↑(frange p) ⊆ ↑T
⊢ support (toSubring p T hp) = support p

tactic: simp only [mem_support_iff, not_iff_not, Ne.def]
state_before: case a
R : Type u
S : Type ?u.88744
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
T : Subring R
hp : ↑(frange p) ⊆ ↑T
i : ℕ
⊢ i ∈ support (toSubring p T hp) ↔ i ∈ support p

tactic: conv_rhs => rw [← coeff_toSubring p T hp]
state_before: case a
R : Type u
S : Type ?u.88744
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
T : Subring R
hp : ↑(frange p) ⊆ ↑T
i : ℕ
⊢ coeff (toSubring p T hp) i = 0 ↔ coeff p i = 0

tactic: exact ⟨fun H => by rw [H, ZeroMemClass.coe_zero], fun H => Subtype.coe_injective H⟩
state_before: case a
R : Type u
S : Type ?u.88744
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
T : Subring R
hp : ↑(frange p) ⊆ ↑T
i : ℕ
⊢ coeff (toSubring p T hp) i = 0 ↔ ↑(coeff (toSubring p T hp) i) = 0

tactic: rw [H, ZeroMemClass.coe_zero]
state_before: R : Type u
S : Type ?u.88744
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
T : Subring R
hp : ↑(frange p) ⊆ ↑T
i : ℕ
H : coeff (toSubring p T hp) i = 0
⊢ ↑(coeff (toSubring p T hp) i) = 0
Theorem: LieIdeal.mem_map_of_surjective
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: rw [← LieSubmodule.mem_coeSubmodule, coe_map_of_surjective h₁, Submodule.mem_map] at h₂
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
y : L'
h₁ : Function.Surjective ↑f
h₂ : y ∈ map f I
⊢ ∃ x, ↑f ↑x = y

tactic: obtain ⟨x, hx, rfl⟩ := h₂
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
y : L'
h₁ : Function.Surjective ↑f
h₂ : ∃ y_1, y_1 ∈ ↑I ∧ ↑↑f y_1 = y
⊢ ∃ x, ↑f ↑x = y

tactic: use ⟨x, hx⟩
state_before: case intro.intro
R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
h₁ : Function.Surjective ↑f
x : L
hx : x ∈ ↑I
⊢ ∃ x_1, ↑f ↑x_1 = ↑↑f x

tactic: rfl
state_before: case intro.intro
R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
h₁ : Function.Surjective ↑f
x : L
hx : x ∈ ↑I
⊢ ↑f ↑{ val := x, property := hx } = ↑↑f x
Theorem: isClosed_iSup_iff
File: Mathlib/Topology/Order.lean

tactic: simp [← @isOpen_compl_iff _ (⨆ i, t i), ← @isOpen_compl_iff _ (t _), isOpen_iSup_iff]
state_before: α : Type u
ι : Sort v
t : ι → TopologicalSpace α
s : Set α
⊢ IsClosed s ↔ ∀ (i : ι), IsClosed s
Theorem: isCoprime_one_right
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: rw [one_mul, zero_mul, zero_add]
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
⊢ 0 * x + 1 * 1 = 1
Theorem: Primrec.vector_cons
File: Mathlib/Computability/Primrec.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.361685
γ : Type ?u.361688
σ : Type ?u.361691
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
n : ℕ
⊢ Primrec fun a => Vector.toList (a.fst ::ᵥ a.snd)

tactic: exact list_cons.comp fst (vector_toList_iff.2 snd)
state_before: α : Type u_1
β : Type ?u.361685
γ : Type ?u.361688
σ : Type ?u.361691
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
n : ℕ
⊢ Primrec fun a => a.fst :: Vector.toList a.snd
Theorem: Set.Ioi_subset_Ioi_iff
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: refine' ⟨fun h => _, fun h => Ioi_subset_Ioi h⟩
state_before: α : Type u_1
β : Type ?u.72368
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
⊢ Ioi b ⊆ Ioi a ↔ a ≤ b

tactic: by_contra ba
state_before: α : Type u_1
β : Type ?u.72368
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h : Ioi b ⊆ Ioi a
⊢ a ≤ b

tactic: exact lt_irrefl _ (h (not_le.mp ba))
state_before: α : Type u_1
β : Type ?u.72368
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h : Ioi b ⊆ Ioi a
ba : ¬a ≤ b
⊢ False
Theorem: coe_finRotate_of_ne_last
File: Mathlib/Logic/Equiv/Fin.lean

tactic: rw [finRotate_succ_apply]
state_before: m n : ℕ
i : Fin (Nat.succ n)
h : i ≠ Fin.last n
⊢ ↑(↑(finRotate (n + 1)) i) = ↑i + 1

tactic: have : (i : ℕ) < n := Fin.val_lt_last h
state_before: m n : ℕ
i : Fin (Nat.succ n)
h : i ≠ Fin.last n
⊢ ↑(i + 1) = ↑i + 1

tactic: exact Fin.val_add_one_of_lt this
state_before: m n : ℕ
i : Fin (Nat.succ n)
h : i ≠ Fin.last n
this : ↑i < n
⊢ ↑(i + 1) = ↑i + 1
Theorem: continuousOn_to_generateFrom_iff
File: Mathlib/Topology/ContinuousOn.lean

tactic: delta ContinuousWithinAt
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.347950
δ : Type ?u.347953
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
s : Set α
T : Set (Set β)
f : α → β
x : α
x✝ : x ∈ s
⊢ ContinuousWithinAt f s x ↔ ∀ (t : Set β), t ∈ T → f x ∈ t → f ⁻¹' t ∈ 𝓝[s] x

tactic: simp only [TopologicalSpace.nhds_generateFrom, tendsto_iInf, tendsto_principal, mem_setOf_eq,
  and_imp]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.347950
δ : Type ?u.347953
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
s : Set α
T : Set (Set β)
f : α → β
x : α
x✝ : x ∈ s
⊢ Tendsto f (𝓝[s] x) (𝓝 (f x)) ↔ ∀ (t : Set β), t ∈ T → f x ∈ t → f ⁻¹' t ∈ 𝓝[s] x

tactic: exact forall_congr' fun t => forall_swap
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.347950
δ : Type ?u.347953
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
s : Set α
T : Set (Set β)
f : α → β
x : α
x✝ : x ∈ s
⊢ (∀ (i : Set β), f x ∈ i → i ∈ T → ∀ᶠ (a : α) in 𝓝[s] x, f a ∈ i) ↔ ∀ (t : Set β), t ∈ T → f x ∈ t → f ⁻¹' t ∈ 𝓝[s] x
Theorem: List.rdropWhile_prefix
File: Mathlib/Data/List/Rdrop.lean

tactic: rw [← reverse_suffix, rdropWhile, reverse_reverse]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdropWhile p l <+: l

tactic: exact dropWhile_suffix _
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ dropWhile p (reverse l) <:+ reverse l
Theorem: Equiv.Perm.next_toList_eq_apply
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: rw [mem_toList_iff] at hy
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p✝ : Perm α
x✝ : α
p : Perm α
x y : α
hy : y ∈ toList p x
⊢ next (toList p x) y hy = ↑p y

tactic: obtain ⟨k, hk, hk'⟩ := hy.left.exists_pow_eq_of_mem_support hy.right
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p✝ : Perm α
x✝ : α
p : Perm α
x y : α
hy✝ : y ∈ toList p x
hy : SameCycle p x y ∧ x ∈ support p
⊢ next (toList p x) y hy✝ = ↑p y

tactic: rw [← nthLe_toList p x k (by simpa using hk)] at hk'
state_before: case intro.intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p✝ : Perm α
x✝ : α
p : Perm α
x y : α
hy✝ : y ∈ toList p x
hy : SameCycle p x y ∧ x ∈ support p
k : ℕ
hk : k < Finset.card (support (cycleOf p x))
hk' : ↑(p ^ k) x = y
⊢ next (toList p x) y hy✝ = ↑p y

tactic: simp_rw [← hk']
state_before: case intro.intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p✝ : Perm α
x✝ : α
p : Perm α
x y : α
hy✝ : y ∈ toList p x
hy : SameCycle p x y ∧ x ∈ support p
k : ℕ
hk : k < Finset.card (support (cycleOf p x))
hk'✝ : ↑(p ^ k) x = y
hk' : nthLe (toList p x) k (_ : k < length (toList p x)) = y
⊢ next (toList p x) y hy✝ = ↑p y

tactic: rw [next_nthLe _ (nodup_toList _ _), nthLe_toList, nthLe_toList, ← mul_apply, ← pow_succ,
  length_toList, pow_apply_eq_pow_mod_orderOf_cycleOf_apply p (k + 1), IsCycle.orderOf]
state_before: case intro.intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p✝ : Perm α
x✝ : α
p : Perm α
x y : α
hy✝ : y ∈ toList p x
hy : SameCycle p x y ∧ x ∈ support p
k : ℕ
hk : k < Finset.card (support (cycleOf p x))
hk'✝ : ↑(p ^ k) x = y
hk' : nthLe (toList p x) k (_ : k < length (toList p x)) = y
⊢ next (toList p x) (nthLe (toList p x) k (_ : k < length (toList p x)))
      (_ : nthLe (toList p x) k (_ : k < length (toList p x)) ∈ toList p x) =
    ↑p (nthLe (toList p x) k (_ : k < length (toList p x)))

tactic: exact isCycle_cycleOf _ (mem_support.mp hy.right)
state_before: case intro.intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p✝ : Perm α
x✝ : α
p : Perm α
x y : α
hy✝ : y ∈ toList p x
hy : SameCycle p x y ∧ x ∈ support p
k : ℕ
hk : k < Finset.card (support (cycleOf p x))
hk'✝ : ↑(p ^ k) x = y
hk' : nthLe (toList p x) k (_ : k < length (toList p x)) = y
⊢ IsCycle (cycleOf p x)

tactic: simpa using hk
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p✝ : Perm α
x✝ : α
p : Perm α
x y : α
hy✝ : y ∈ toList p x
hy : SameCycle p x y ∧ x ∈ support p
k : ℕ
hk : k < Finset.card (support (cycleOf p x))
hk' : ↑(p ^ k) x = y
⊢ k < length (toList p x)
Theorem: Even.pow_pos
File: Mathlib/Algebra/Parity.lean

tactic: cases' hn with k hk
state_before: F : Type ?u.107024
α : Type ?u.107027
β : Type ?u.107030
R : Type u_1
inst✝ : LinearOrderedRing R
a : R
n : ℕ
hn : Even n
ha : a ≠ 0
⊢ 0 < a ^ n

tactic: simpa only [hk, two_mul] using pow_bit0_pos ha k
state_before: case intro
F : Type ?u.107024
α : Type ?u.107027
β : Type ?u.107030
R : Type u_1
inst✝ : LinearOrderedRing R
a : R
n : ℕ
ha : a ≠ 0
k : ℕ
hk : n = k + k
⊢ 0 < a ^ n
Theorem: Cardinal.toNat_mul
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rcases eq_or_ne x 0 with (rfl | hx1)
state_before: α β : Type u
x y : Cardinal
⊢ ↑toNat (x * y) = ↑toNat x * ↑toNat y

tactic: rcases eq_or_ne y 0 with (rfl | hy1)
state_before: case inr
α β : Type u
x y : Cardinal
hx1 : x ≠ 0
⊢ ↑toNat (x * y) = ↑toNat x * ↑toNat y

tactic: cases' lt_or_le x ℵ₀ with hx2 hx2
state_before: case inr.inr
α β : Type u
x y : Cardinal
hx1 : x ≠ 0
hy1 : y ≠ 0
⊢ ↑toNat (x * y) = ↑toNat x * ↑toNat y

tactic: rw [zero_mul, zero_toNat, zero_mul]
state_before: case inl
α β : Type u
y : Cardinal
⊢ ↑toNat (0 * y) = ↑toNat 0 * ↑toNat y

tactic: rw [mul_zero, zero_toNat, mul_zero]
state_before: case inr.inl
α β : Type u
x : Cardinal
hx1 : x ≠ 0
⊢ ↑toNat (x * 0) = ↑toNat x * ↑toNat 0

tactic: cases' lt_or_le y ℵ₀ with hy2 hy2
state_before: case inr.inr.inl
α β : Type u
x y : Cardinal
hx1 : x ≠ 0
hy1 : y ≠ 0
hx2 : x < ℵ₀
⊢ ↑toNat (x * y) = ↑toNat x * ↑toNat y

tactic: lift x to ℕ using hx2
state_before: case inr.inr.inl.inl
α β : Type u
x y : Cardinal
hx1 : x ≠ 0
hy1 : y ≠ 0
hx2 : x < ℵ₀
hy2 : y < ℵ₀
⊢ ↑toNat (x * y) = ↑toNat x * ↑toNat y

tactic: lift y to ℕ using hy2
state_before: case inr.inr.inl.inl.intro
α β : Type u
y : Cardinal
hy1 : y ≠ 0
hy2 : y < ℵ₀
x : ℕ
hx1 : ↑x ≠ 0
⊢ ↑toNat (↑x * y) = ↑toNat ↑x * ↑toNat y

tactic: rw [← Nat.cast_mul, toNat_cast, toNat_cast, toNat_cast]
state_before: case inr.inr.inl.inl.intro.intro
α β : Type u
x : ℕ
hx1 : ↑x ≠ 0
y : ℕ
hy1 : ↑y ≠ 0
⊢ ↑toNat (↑x * ↑y) = ↑toNat ↑x * ↑toNat ↑y

tactic: rw [toNat_apply_of_aleph0_le hy2, mul_zero, toNat_apply_of_aleph0_le]
state_before: case inr.inr.inl.inr
α β : Type u
x y : Cardinal
hx1 : x ≠ 0
hy1 : y ≠ 0
hx2 : x < ℵ₀
hy2 : ℵ₀ ≤ y
⊢ ↑toNat (x * y) = ↑toNat x * ↑toNat y

tactic: exact aleph0_le_mul_iff'.2 (Or.inl ⟨hx1, hy2⟩)
state_before: case inr.inr.inl.inr
α β : Type u
x y : Cardinal
hx1 : x ≠ 0
hy1 : y ≠ 0
hx2 : x < ℵ₀
hy2 : ℵ₀ ≤ y
⊢ ℵ₀ ≤ x * y

tactic: rw [toNat_apply_of_aleph0_le hx2, zero_mul, toNat_apply_of_aleph0_le]
state_before: case inr.inr.inr
α β : Type u
x y : Cardinal
hx1 : x ≠ 0
hy1 : y ≠ 0
hx2 : ℵ₀ ≤ x
⊢ ↑toNat (x * y) = ↑toNat x * ↑toNat y

tactic: exact aleph0_le_mul_iff'.2 (Or.inr ⟨hx2, hy1⟩)
state_before: case inr.inr.inr
α β : Type u
x y : Cardinal
hx1 : x ≠ 0
hy1 : y ≠ 0
hx2 : ℵ₀ ≤ x
⊢ ℵ₀ ≤ x * y
Theorem: LucasLehmer.mersenne_coe_X
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: ext <;> simp [mersenne, q, ZMod.nat_cast_zmod_eq_zero_iff_dvd, -pow_pos]
state_before: p : ℕ
⊢ ↑(mersenne p) = 0

tactic: apply Nat.minFac_dvd
state_before: case h₁
p : ℕ
⊢ minFac (2 ^ p - 1) ∣ 2 ^ p - 1
Theorem: Ideal.quotient_map_C_eq_zero
File: Mathlib/RingTheory/Polynomial/Quotient.lean

tactic: intro a ha
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
⊢ ∀ (a : R), a ∈ I → ↑(RingHom.comp (Quotient.mk (map C I)) C) a = 0

tactic: rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
a : R
ha : a ∈ I
⊢ ↑(RingHom.comp (Quotient.mk (map C I)) C) a = 0

tactic: exact mem_map_of_mem _ ha
state_before: R : Type u_1
inst✝ : CommRing R
I : Ideal R
a : R
ha : a ∈ I
⊢ ↑C a ∈ map C I
Theorem: Filter.not_frequently
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [Filter.Frequently, not_not]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.161580
ι : Sort x
p : α → Prop
f : Filter α
⊢ (¬∃ᶠ (x : α) in f, p x) ↔ ∀ᶠ (x : α) in f, ¬p x
Theorem: CategoryTheory.isCoseparator_unop_iff
File: Mathlib/CategoryTheory/Generator.lean

tactic: rw [IsSeparator, IsCoseparator, ← isCoseparating_unop_iff, Set.singleton_unop]
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
G : Cᵒᵖ
⊢ IsCoseparator G.unop ↔ IsSeparator G
Theorem: Submonoid.mem_sup_left
File: Mathlib/GroupTheory/Submonoid/Membership.lean

tactic: rw [←SetLike.le_def]
state_before: M : Type u_1
A : Type ?u.43722
B : Type ?u.43725
inst✝ : MulOneClass M
S T : Submonoid M
⊢ ∀ {x : M}, x ∈ S → x ∈ S ⊔ T

tactic: exact le_sup_left
state_before: M : Type u_1
A : Type ?u.43722
B : Type ?u.43725
inst✝ : MulOneClass M
S T : Submonoid M
⊢ S ≤ S ⊔ T
Theorem: SimpleGraph.Walk.support_eq_cons
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: cases p <;> simp
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : Walk G u v
⊢ support p = u :: List.tail (support p)
Theorem: LinearMap.traceAux_eq
File: Mathlib/LinearAlgebra/Trace.lean

tactic: rw [LinearMap.id_comp, LinearMap.comp_id]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ trace (↑(toMatrix b b) f) = trace (↑(toMatrix b b) (comp (comp id f) id))

tactic: rw [LinearMap.toMatrix_comp _ c, LinearMap.toMatrix_comp _ c]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ trace (↑(toMatrix b b) (comp (comp id f) id)) = trace (↑(toMatrix c b) id ⬝ ↑(toMatrix c c) f ⬝ ↑(toMatrix b c) id)

tactic: rw [Matrix.mul_assoc, Matrix.trace_mul_comm]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ trace (↑(toMatrix c b) id ⬝ ↑(toMatrix c c) f ⬝ ↑(toMatrix b c) id) =
    trace (↑(toMatrix c c) f ⬝ ↑(toMatrix b c) id ⬝ ↑(toMatrix c b) id)

tactic: rw [LinearMap.toMatrix_comp _ b, LinearMap.toMatrix_comp _ c]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ trace (↑(toMatrix c c) f ⬝ ↑(toMatrix b c) id ⬝ ↑(toMatrix c b) id) = trace (↑(toMatrix c c) (comp (comp f id) id))

tactic: rw [LinearMap.comp_id, LinearMap.comp_id]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ trace (↑(toMatrix c c) (comp (comp f id) id)) = trace (↑(toMatrix c c) f)
Theorem: LinearMap.iSup_range_stdBasis
File: Mathlib/LinearAlgebra/StdBasis.lean

tactic: cases nonempty_fintype ι
state_before: R : Type u_3
ι : Type u_1
inst✝⁴ : Semiring R
φ : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
⊢ (⨆ (i : ι), range (stdBasis R φ i)) = ⊤

tactic: convert top_unique (iInf_emptyset.ge.trans <| iInf_ker_proj_le_iSup_range_stdBasis R φ _)
state_before: case intro
R : Type u_3
ι : Type u_1
inst✝⁴ : Semiring R
φ : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
⊢ (⨆ (i : ι), range (stdBasis R φ i)) = ⊤

tactic: rename_i i
state_before: case h.e'_2.h.e'_4.h
R : Type u_3
ι : Type u_1
inst✝⁴ : Semiring R
φ : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
x✝ : ι
⊢ range (stdBasis R φ x✝) = ⨆ (_ : x✝ ∈ ?intro.convert_1), range (stdBasis R φ x✝)

tactic: exact ((@iSup_pos _ _ _ fun _ => range <| stdBasis R φ i) <| Finset.mem_univ i).symm
state_before: case h.e'_2.h.e'_4.h
R : Type u_3
ι : Type u_1
inst✝⁴ : Semiring R
φ : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
i : ι
⊢ range (stdBasis R φ i) = ⨆ (_ : i ∈ ?intro.convert_1), range (stdBasis R φ i)

tactic: rw [Finset.coe_univ, Set.union_empty]
state_before: case intro.convert_2
R : Type u_3
ι : Type u_1
inst✝⁴ : Semiring R
φ : ι → Type u_2
inst✝³ : (i : ι) → AddCommMonoid (φ i)
inst✝² : (i : ι) → Module R (φ i)
inst✝¹ : DecidableEq ι
inst✝ : Finite ι
val✝ : Fintype ι
⊢ Set.univ ⊆ ↑Finset.univ ∪ ∅
Theorem: Num.mod_zero
File: Mathlib/Data/Num/Lemmas.lean

tactic: cases n
state_before: n : Num
⊢ mod n 0 = n

tactic: rfl
state_before: case zero

⊢ mod zero 0 = zero

tactic: simp [Num.mod]
state_before: case pos
a✝ : PosNum
⊢ mod (pos a✝) 0 = pos a✝
Theorem: Finset.Icc_eq_empty_iff
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: rw [← coe_eq_empty, coe_Icc, Set.Icc_eq_empty_iff]
state_before: ι : Type ?u.1120
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Icc a b = ∅ ↔ ¬a ≤ b
Theorem: nilpotencyClass_zero_iff_subsingleton
File: Mathlib/GroupTheory/Nilpotent.lean

tactic: rw [Group.nilpotencyClass, @Nat.find_eq_zero _ (Classical.decPred _), upperCentralSeries_zero,
  subsingleton_iff_bot_eq_top, Subgroup.subsingleton_iff]
state_before: G : Type u_1
inst✝² : Group G
H : Subgroup G
inst✝¹ : Normal H
inst✝ : Group.IsNilpotent G
⊢ nilpotencyClass G = 0 ↔ Subsingleton G