tasksource/leandojo huggingface dataset:
Theorem: Fin.succAbove_pred
File: Mathlib/Data/Fin/Basic.lean

tactic: rw [succAbove_above, succ_pred]
state_before: n m : ℕ
x y : Fin (n + 1)
h : x < y
hy : optParam (y ≠ 0) (_ : y ≠ 0)
⊢ ↑(succAbove x) (pred y hy) = y

tactic: simpa [le_iff_val_le_val] using Nat.le_pred_of_lt h
state_before: case h
n m : ℕ
x y : Fin (n + 1)
h : x < y
hy : optParam (y ≠ 0) (_ : y ≠ 0)
⊢ x ≤ ↑castSucc (pred y hy)
Theorem: exists_nonneg_right_iff_sameRay
File: Mathlib/LinearAlgebra/Ray.lean

tactic: rw [SameRay.sameRay_comm]
state_before: R : Type u_2
inst✝² : LinearOrderedField R
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x y : M
hy : y ≠ 0
⊢ (∃ r, 0 ≤ r ∧ x = r • y) ↔ SameRay R x y

tactic: simp_rw [eq_comm (a := x)]
state_before: R : Type u_2
inst✝² : LinearOrderedField R
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x y : M
hy : y ≠ 0
⊢ (∃ r, 0 ≤ r ∧ x = r • y) ↔ SameRay R y x

tactic: exact exists_nonneg_left_iff_sameRay (R := R) hy
state_before: R : Type u_2
inst✝² : LinearOrderedField R
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x y : M
hy : y ≠ 0
⊢ (∃ r, 0 ≤ r ∧ r • y = x) ↔ SameRay R y x
Theorem: ENNReal.mul_self_lt_top_iff
File: Mathlib/Data/Real/ENNReal.lean

tactic: rw [ENNReal.mul_lt_top_iff, and_self, or_self, or_iff_left_iff_imp]
state_before: α : Type ?u.93966
β : Type ?u.93969
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ a * a < ⊤ ↔ a < ⊤

tactic: rintro rfl
state_before: α : Type ?u.93966
β : Type ?u.93969
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ a = 0 → a < ⊤

tactic: norm_num
state_before: α : Type ?u.93966
β : Type ?u.93969
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 0 < ⊤
Theorem: Complex.arg_neg_eq_arg_add_pi_iff
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: rcases lt_trichotomy x.im 0 with (hi | hi | hi)
state_before: x : ℂ
⊢ arg (-x) = arg x + π ↔ x.im < 0 ∨ x.im = 0 ∧ 0 < x.re

tactic: simp [hi, arg_neg_eq_arg_add_pi_of_im_neg]
state_before: case inl
x : ℂ
hi : x.im < 0
⊢ arg (-x) = arg x + π ↔ x.im < 0 ∨ x.im = 0 ∧ 0 < x.re

tactic: rw [(ext rfl hi : x = x.re)]
state_before: case inr.inl
x : ℂ
hi : x.im = 0
⊢ arg (-x) = arg x + π ↔ x.im < 0 ∨ x.im = 0 ∧ 0 < x.re

tactic: rcases lt_trichotomy x.re 0 with (hr | hr | hr)
state_before: case inr.inl
x : ℂ
hi : x.im = 0
⊢ arg (-↑x.re) = arg ↑x.re + π ↔ (↑x.re).im < 0 ∨ (↑x.re).im = 0 ∧ 0 < (↑x.re).re

tactic: rw [arg_ofReal_of_neg hr, ← ofReal_neg, arg_ofReal_of_nonneg (Left.neg_pos_iff.2 hr).le]
state_before: case inr.inl.inl
x : ℂ
hi : x.im = 0
hr : x.re < 0
⊢ arg (-↑x.re) = arg ↑x.re + π ↔ (↑x.re).im < 0 ∨ (↑x.re).im = 0 ∧ 0 < (↑x.re).re

tactic: simp [hr.not_lt, ← two_mul, Real.pi_ne_zero]
state_before: case inr.inl.inl
x : ℂ
hi : x.im = 0
hr : x.re < 0
⊢ 0 = π + π ↔ (↑x.re).im < 0 ∨ (↑x.re).im = 0 ∧ 0 < (↑x.re).re

tactic: simp [hr, hi, Real.pi_ne_zero.symm]
state_before: case inr.inl.inr.inl
x : ℂ
hi : x.im = 0
hr : x.re = 0
⊢ arg (-↑x.re) = arg ↑x.re + π ↔ (↑x.re).im < 0 ∨ (↑x.re).im = 0 ∧ 0 < (↑x.re).re

tactic: rw [arg_ofReal_of_nonneg hr.le, ← ofReal_neg, arg_ofReal_of_neg (Left.neg_neg_iff.2 hr)]
state_before: case inr.inl.inr.inr
x : ℂ
hi : x.im = 0
hr : 0 < x.re
⊢ arg (-↑x.re) = arg ↑x.re + π ↔ (↑x.re).im < 0 ∨ (↑x.re).im = 0 ∧ 0 < (↑x.re).re

tactic: simp [hr]
state_before: case inr.inl.inr.inr
x : ℂ
hi : x.im = 0
hr : 0 < x.re
⊢ π = 0 + π ↔ (↑x.re).im < 0 ∨ (↑x.re).im = 0 ∧ 0 < (↑x.re).re

tactic: simp [hi, hi.ne.symm, hi.not_lt, arg_neg_eq_arg_sub_pi_of_im_pos, sub_eq_add_neg, ←
  add_eq_zero_iff_neg_eq, Real.pi_ne_zero]
state_before: case inr.inr
x : ℂ
hi : 0 < x.im
⊢ arg (-x) = arg x + π ↔ x.im < 0 ∨ x.im = 0 ∧ 0 < x.re
Theorem: Hyperreal.infiniteNeg_iff_infinitesimal_inv_neg
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rw [← infinitePos_neg, infinitePos_iff_infinitesimal_inv_pos, inv_neg, neg_pos, infinitesimal_neg]
state_before: x : ℝ*
⊢ InfiniteNeg x ↔ Infinitesimal x⁻¹ ∧ x⁻¹ < 0
Theorem: SimpleGraph.edgeFinset_bot
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: simp [edgeFinset]
state_before: ι : Sort ?u.109715
𝕜 : Type ?u.109718
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
G₁ G₂ : SimpleGraph V
inst✝² : Fintype ↑(edgeSet G)
inst✝¹ : Fintype ↑(edgeSet G₁)
inst✝ : Fintype ↑(edgeSet G₂)
⊢ edgeFinset ⊥ = ∅
Theorem: Multiset.toList_eq_nil
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [← coe_eq_zero, coe_toList]
state_before: α : Type u_1
β : Type ?u.31041
γ : Type ?u.31044
s : Multiset α
⊢ toList s = [] ↔ s = 0
Theorem: Pi.hasSum
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: simp only [HasSum, tendsto_pi_nhds, sum_apply]
state_before: α : Type u_1
β : Type ?u.798357
γ : Type ?u.798360
δ : Type ?u.798363
ι : Type u_3
π : α → Type u_2
inst✝¹ : (x : α) → AddCommMonoid (π x)
inst✝ : (x : α) → TopologicalSpace (π x)
f : ι → (x : α) → π x
g : (x : α) → π x
⊢ HasSum f g ↔ ∀ (x : α), HasSum (fun i => f i x) (g x)
Theorem: Int.ceil_add_nat
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← Int.cast_ofNat, ceil_add_int]
state_before: F : Type ?u.213247
α : Type u_1
β : Type ?u.213253
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
n : ℕ
⊢ ⌈a + ↑n⌉ = ⌈a⌉ + ↑n
Theorem: Ergodic.ae_empty_or_univ_of_image_ae_le'
File: Mathlib/Dynamics/Ergodic/Ergodic.lean

tactic: replace hs' : s ≤ᵐ[μ] f ⁻¹' s :=
  (HasSubset.Subset.eventuallyLE (subset_preimage_image f s)).trans
    (hf.quasiMeasurePreserving.preimage_mono_ae hs')
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : MeasureTheory.Measure α
hf : Ergodic f
hs : MeasurableSet s
hs' : f '' s ≤ᶠ[ae μ] s
h_fin : ↑↑μ s ≠ ⊤
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ

tactic: exact ae_empty_or_univ_of_ae_le_preimage' hf hs hs' h_fin
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : MeasureTheory.Measure α
hf : Ergodic f
hs : MeasurableSet s
h_fin : ↑↑μ s ≠ ⊤
hs' : s ≤ᶠ[ae μ] f ⁻¹' s
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ
Theorem: OreLocalization.universalHom_commutes
File: Mathlib/RingTheory/OreLocalization/Basic.lean

tactic: simp [numeratorHom_apply, universalHom_apply]
state_before: R : Type u_2
inst✝² : Semiring R
S : Submonoid R
inst✝¹ : OreSet S
T : Type u_1
inst✝ : Semiring T
f : R →+* T
fS : { x // x ∈ S } →* Tˣ
hf : ∀ (s : { x // x ∈ S }), ↑f ↑s = ↑(↑fS s)
r : R
⊢ ↑(universalHom f fS hf) (↑numeratorHom r) = ↑f r
Theorem: LieSubalgebra.sInf_coe
File: Mathlib/Algebra/Lie/Subalgebra.lean

tactic: rw [← coe_to_submodule, sInf_coe_to_submodule, Submodule.sInf_coe]
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
S : Set (LieSubalgebra R L)
⊢ ↑(sInf S) = ⋂ (s : LieSubalgebra R L) (_ : s ∈ S), ↑s

tactic: ext x
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
S : Set (LieSubalgebra R L)
⊢ (⋂ (p : Submodule R L) (_ : p ∈ {x | ∃ s, s ∈ S ∧ s.toSubmodule = x}), ↑p) = ⋂ (s : LieSubalgebra R L) (_ : s ∈ S), ↑s

tactic: simp
state_before: case h
R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
S : Set (LieSubalgebra R L)
x : L
⊢ (x ∈ ⋂ (p : Submodule R L) (_ : p ∈ {x | ∃ s, s ∈ S ∧ s.toSubmodule = x}), ↑p) ↔
    x ∈ ⋂ (s : LieSubalgebra R L) (_ : s ∈ S), ↑s
Theorem: Fin.insertNth_apply_below
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: rw [insertNth, succAboveCases, dif_neg h.ne, dif_pos h]
state_before: m n : ℕ
α : Fin (n + 1) → Type u
β : Type v
i j : Fin (n + 1)
h : j < i
x : α i
p : (k : Fin n) → α (↑(succAbove i) k)
⊢ insertNth i x p j = Eq.recOn (_ : ↑(succAbove i) (castLT j (_ : ↑j < n)) = j) (p (castLT j (_ : ↑j < n)))
Theorem: Decidable.and_forall_ne
File: Mathlib/Logic/Basic.lean

tactic: simp only [← @forall_eq _ p a, ← forall_and, ← or_imp, Decidable.em, forall_const]
state_before: ι : Sort ?u.15695
α : Sort u_1
κ : ι → Sort ?u.15697
p✝ q : α → Prop
inst✝ : DecidableEq α
a : α
p : α → Prop
⊢ (p a ∧ ∀ (b : α), b ≠ a → p b) ↔ ∀ (b : α), p b
Theorem: ZMod.int_cast_eq_int_cast_iff_dvd_sub
File: Mathlib/Data/ZMod/Basic.lean

tactic: rw [ZMod.int_cast_eq_int_cast_iff, Int.modEq_iff_dvd]
state_before: a b : ℤ
c : ℕ
⊢ ↑a = ↑b ↔ ↑c ∣ b - a
Theorem: FiniteField.forall_pow_eq_one_iff
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: obtain ⟨x, hx⟩ := IsCyclic.exists_generator (α := Kˣ)
state_before: K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
⊢ (∀ (x : Kˣ), x ^ i = 1) ↔ q - 1 ∣ i

tactic: rw [← Fintype.card_units, ← orderOf_eq_card_of_forall_mem_zpowers hx,
  orderOf_dvd_iff_pow_eq_one]
state_before: case intro
K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) ↔ q - 1 ∣ i

tactic: constructor
state_before: case intro
K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) ↔ x ^ i = 1

tactic: intro h
state_before: case intro.mp
K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) → x ^ i = 1

tactic: apply h
state_before: case intro.mp
K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
h : ∀ (x : Kˣ), x ^ i = 1
⊢ x ^ i = 1

tactic: intro h y
state_before: case intro.mpr
K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ x ^ i = 1 → ∀ (x : Kˣ), x ^ i = 1

tactic: simp_rw [← mem_powers_iff_mem_zpowers] at hx
state_before: case intro.mpr
K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
h : x ^ i = 1
y : Kˣ
⊢ y ^ i = 1

tactic: rcases hx y with ⟨j, rfl⟩
state_before: case intro.mpr
K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
h : x ^ i = 1
y : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Submonoid.powers x
⊢ y ^ i = 1

tactic: rw [← pow_mul, mul_comm, pow_mul, h, one_pow]
state_before: case intro.mpr.intro
K : Type u_1
R : Type ?u.404549
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
h : x ^ i = 1
hx : ∀ (x_1 : Kˣ), x_1 ∈ Submonoid.powers x
j : ℕ
⊢ (fun x x_1 => x ^ x_1) x j ^ i = 1
Theorem: Localization.mk_self
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: symm
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type ?u.129008
inst✝¹ : CommMonoid N
P : Type ?u.129014
inst✝ : CommMonoid P
a : { x // x ∈ S }
⊢ mk (↑a) a = 1

tactic: rw [← mk_one, mk_eq_mk_iff]
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type ?u.129008
inst✝¹ : CommMonoid N
P : Type ?u.129014
inst✝ : CommMonoid P
a : { x // x ∈ S }
⊢ 1 = mk (↑a) a

tactic: exact one_rel a
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type ?u.129008
inst✝¹ : CommMonoid N
P : Type ?u.129014
inst✝ : CommMonoid P
a : { x // x ∈ S }
⊢ ↑(r S) (1, 1) (↑a, a)
Theorem: Matrix.transpose_circulant
File: Mathlib/LinearAlgebra/Matrix/Circulant.lean

tactic: ext
state_before: α : Type u_2
β : Type ?u.5768
m : Type ?u.5771
n : Type u_1
R : Type ?u.5777
inst✝ : AddGroup n
v : n → α
⊢ (circulant v)ᵀ = circulant fun i => v (-i)

tactic: simp
state_before: case a.h
α : Type u_2
β : Type ?u.5768
m : Type ?u.5771
n : Type u_1
R : Type ?u.5777
inst✝ : AddGroup n
v : n → α
i✝ x✝ : n
⊢ (circulant v)ᵀ i✝ x✝ = circulant (fun i => v (-i)) i✝ x✝
Theorem: ZMod.card
File: Mathlib/Data/ZMod/Defs.lean

tactic: cases n with
| zero => exact (not_finite (ZMod 0)).elim
| succ n => convert Fintype.card_fin (n + 1) using 2
state_before: n : ℕ
inst✝ : Fintype (ZMod n)
⊢ Fintype.card (ZMod n) = n

tactic: exact (not_finite (ZMod 0)).elim
state_before: case zero
inst✝ : Fintype (ZMod Nat.zero)
⊢ Fintype.card (ZMod Nat.zero) = Nat.zero

tactic: convert Fintype.card_fin (n + 1) using 2
state_before: case succ
n : ℕ
inst✝ : Fintype (ZMod (Nat.succ n))
⊢ Fintype.card (ZMod (Nat.succ n)) = Nat.succ n
Theorem: lp.norm_rpow_eq_tsum
File: Mathlib/Analysis/NormedSpace/lpSpace.lean

tactic: rw [norm_eq_tsum_rpow hp, ← Real.rpow_mul]
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : { x // x ∈ lp E p }
⊢ ‖f‖ ^ ENNReal.toReal p = ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p

tactic: apply tsum_nonneg
state_before: case hx
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : { x // x ∈ lp E p }
⊢ 0 ≤ ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p

tactic: intro i
state_before: case hx.h
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : { x // x ∈ lp E p }
⊢ ∀ (i : α), 0 ≤ ‖↑f i‖ ^ ENNReal.toReal p

tactic: calc
  (0 : ℝ) = (0 : ℝ) ^ p.toReal := by rw [Real.zero_rpow hp.ne']
  _ ≤ _ := Real.rpow_le_rpow rfl.le (norm_nonneg (f i)) hp.le
state_before: case hx.h
α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : { x // x ∈ lp E p }
i : α
⊢ 0 ≤ ‖↑f i‖ ^ ENNReal.toReal p

tactic: field_simp [hp.ne']
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : { x // x ∈ lp E p }
⊢ (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ^ (1 / ENNReal.toReal p * ENNReal.toReal p) =
    ∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p

tactic: rw [Real.zero_rpow hp.ne']
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : { x // x ∈ lp E p }
i : α
⊢ 0 = 0 ^ ENNReal.toReal p
Theorem: Finset.gcd_union
File: Mathlib/Algebra/GCDMonoid/Finset.lean

tactic: rw [empty_union, gcd_empty, gcd_zero_left, normalize_gcd]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.16783
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
⊢ gcd (∅ ∪ s₂) f = GCDMonoid.gcd (gcd ∅ f) (gcd s₂ f)

tactic: rw [insert_union, gcd_insert, gcd_insert, ih, gcd_assoc]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.16783
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s✝ s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
a : β
s : Finset β
x✝ : ¬a ∈ s
ih : gcd (s ∪ s₂) f = GCDMonoid.gcd (gcd s f) (gcd s₂ f)
⊢ gcd (insert a s ∪ s₂) f = GCDMonoid.gcd (gcd (insert a s) f) (gcd s₂ f)
Theorem: Finset.erase_sdiff_distrib
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [erase_eq, sdiff_sdiff, sup_sdiff_eq_sup le_rfl, sup_comm]
state_before: α : Type u_1
β : Type ?u.264321
γ : Type ?u.264324
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a✝ b : α
s t : Finset α
a : α
⊢ erase (s \ t) a = erase s a \ erase t a
Theorem: Nat.testBit_succ
File: Mathlib/Init/Data/Nat/Bitwise.lean

tactic: have : bodd (shiftr (shiftr (bit b n) 1) m) = bodd (shiftr n m) := by
  dsimp [shiftr]
  rw [div2_bit]
state_before: m : ℕ
b : Bool
n : ℕ
⊢ testBit (bit b n) (succ m) = testBit n m

tactic: rw [← shiftr_add, Nat.add_comm] at this
state_before: m : ℕ
b : Bool
n : ℕ
this : bodd (shiftr (shiftr (bit b n) 1) m) = bodd (shiftr n m)
⊢ testBit (bit b n) (succ m) = testBit n m

tactic: exact this
state_before: m : ℕ
b : Bool
n : ℕ
this : bodd (shiftr (bit b n) (m + 1)) = bodd (shiftr n m)
⊢ testBit (bit b n) (succ m) = testBit n m

tactic: dsimp [shiftr]
state_before: m : ℕ
b : Bool
n : ℕ
⊢ bodd (shiftr (shiftr (bit b n) 1) m) = bodd (shiftr n m)

tactic: rw [div2_bit]
state_before: m : ℕ
b : Bool
n : ℕ
⊢ bodd (shiftr (div2 (bit b n)) m) = bodd (shiftr n m)
Theorem: Quaternion.normSq_int_cast
File: Mathlib/Algebra/Quaternion.lean

tactic: rw [← coe_int_cast, normSq_coe]
state_before: S : Type ?u.656985
T : Type ?u.656988
R : Type u_1
inst✝ : CommRing R
r x y z✝ : R
a b c : ℍ[R]
z : ℤ
⊢ ↑normSq ↑z = ↑z ^ 2
Theorem: AddSubgroup.int_mul_mem
File: Mathlib/RingTheory/Subring/Basic.lean

tactic: convert AddSubgroup.zsmul_mem G h k using 1
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
G : AddSubgroup R
k : ℤ
g : R
h : g ∈ G
⊢ ↑k * g ∈ G

tactic: simp
state_before: case h.e'_4
R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
G : AddSubgroup R
k : ℤ
g : R
h : g ∈ G
⊢ ↑k * g = k • g
Theorem: SimpleGraph.Subgraph.deleteEdges_inter_edgeSet_right_eq
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: ext <;> simp (config := { contextual := true }) [imp_false]
state_before: ι : Sort ?u.253463
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
⊢ deleteEdges G' (s ∩ edgeSet G') = deleteEdges G' s
Theorem: finprod_of_infinite_mulSupport
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: classical rw [finprod_def, dif_neg hf]
state_before: α : Type u_1
β : Type ?u.185720
ι : Type ?u.185723
G : Type ?u.185726
M : Type u_2
N : Type ?u.185732
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
hf : Set.Infinite (mulSupport f)
⊢ (∏ᶠ (i : α), f i) = 1

tactic: rw [finprod_def, dif_neg hf]
state_before: α : Type u_1
β : Type ?u.185720
ι : Type ?u.185723
G : Type ?u.185726
M : Type u_2
N : Type ?u.185732
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
hf : Set.Infinite (mulSupport f)
⊢ (∏ᶠ (i : α), f i) = 1
Theorem: Std.HashMap.Imp.Bucket.update_update
File: Std/Data/HashMap/WF.lean

tactic: simp [update]
state_before: α : Type u_1
β : Type u_2
self : Bucket α β
i : USize
d d' : AssocList α β
h : USize.toNat i < Array.size self.val
h' : USize.toNat i < Array.size (update self i d h).val
⊢ update (update self i d h) i d' h' = update self i d' h

tactic: congr 1
state_before: α : Type u_1
β : Type u_2
self : Bucket α β
i : USize
d d' : AssocList α β
h : USize.toNat i < Array.size self.val
h' : USize.toNat i < Array.size (update self i d h).val
⊢ { val := Array.set (Array.set self.val { val := USize.toNat i, isLt := h } d) { val := USize.toNat i, isLt := h' } d',
      property :=
        (_ :
          (fun b => 0 < Array.size b)
            (Array.set (Array.set self.val { val := USize.toNat i, isLt := h } d) { val := USize.toNat i, isLt := h' }
              d')) } =
    { val := Array.set self.val { val := USize.toNat i, isLt := h } d',
      property := (_ : (fun b => 0 < Array.size b) (Array.set self.val { val := USize.toNat i, isLt := h } d')) }

tactic: rw [Array.set_set]
state_before: case e_val
α : Type u_1
β : Type u_2
self : Bucket α β
i : USize
d d' : AssocList α β
h : USize.toNat i < Array.size self.val
h' : USize.toNat i < Array.size (update self i d h).val
⊢ Array.set (Array.set self.val { val := USize.toNat i, isLt := h } d) { val := USize.toNat i, isLt := h' } d' =
    Array.set self.val { val := USize.toNat i, isLt := h } d'
Theorem: Submonoid.LocalizationMap.mk'_eq_iff_eq'
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: simp only [f.mk'_eq_iff_eq, mul_comm]
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type ?u.851307
inst✝ : CommMonoid P
f : LocalizationMap S N
x₁ x₂ : M
y₁ y₂ : { x // x ∈ S }
⊢ mk' f x₁ y₁ = mk' f x₂ y₂ ↔ ↑(toMap f) (x₁ * ↑y₂) = ↑(toMap f) (x₂ * ↑y₁)
Theorem: Cardinal.eq_of_add_eq_add_right
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rw [add_comm a b, add_comm c b] at h
state_before: a b c : Cardinal
h : a + b = c + b
hb : b < ℵ₀
⊢ a = c

tactic: exact Cardinal.eq_of_add_eq_add_left h hb
state_before: a b c : Cardinal
h : b + a = b + c
hb : b < ℵ₀
⊢ a = c
Theorem: ae_eq_trim_of_measurable
File: Mathlib/MeasureTheory/Group/Arithmetic.lean

tactic: rwa [Filter.EventuallyEq, @ae_iff _ m, trim_measurableSet_eq hm _]
state_before: G : Type ?u.2153121
α✝ : Type ?u.2153124
inst✝⁵ : MeasurableSpace G
inst✝⁴ : Div G
m✝ : MeasurableSpace α✝
f✝ g✝ : α✝ → G
μ✝ : MeasureTheory.Measure α✝
α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : MeasurableSpace E
inst✝² : AddGroup E
inst✝¹ : MeasurableSingletonClass E
inst✝ : MeasurableSub₂ E
hm : m ≤ m0
f g : α → E
hf : Measurable f
hg : Measurable g
hfg : f =ᵐ[μ] g
⊢ f =ᵐ[Measure.trim μ hm] g

tactic: exact @MeasurableSet.compl α _ m (@measurableSet_eq_fun α m E _ _ _ _ _ _ hf hg)
state_before: G : Type ?u.2153121
α✝ : Type ?u.2153124
inst✝⁵ : MeasurableSpace G
inst✝⁴ : Div G
m✝ : MeasurableSpace α✝
f✝ g✝ : α✝ → G
μ✝ : MeasureTheory.Measure α✝
α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : MeasurableSpace E
inst✝² : AddGroup E
inst✝¹ : MeasurableSingletonClass E
inst✝ : MeasurableSub₂ E
hm : m ≤ m0
f g : α → E
hf : Measurable f
hg : Measurable g
hfg : f =ᵐ[μ] g
⊢ MeasurableSet {a | ¬f a = g a}
Theorem: Set.range_ite_subset
File: Mathlib/Data/Set/Image.lean

tactic: rw [range_subset_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.93493
ι : Sort ?u.93496
ι' : Sort ?u.93499
f✝ : ι → α
s t : Set α
p : α → Prop
inst✝ : DecidablePred p
f g : α → β
⊢ (range fun x => if p x then f x else g x) ⊆ range f ∪ range g

tactic: intro x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.93493
ι : Sort ?u.93496
ι' : Sort ?u.93499
f✝ : ι → α
s t : Set α
p : α → Prop
inst✝ : DecidablePred p
f g : α → β
⊢ ∀ (y : α), (if p y then f y else g y) ∈ range f ∪ range g

tactic: by_cases h : p x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.93493
ι : Sort ?u.93496
ι' : Sort ?u.93499
f✝ : ι → α
s t : Set α
p : α → Prop
inst✝ : DecidablePred p
f g : α → β
x : α
⊢ (if p x then f x else g x) ∈ range f ∪ range g

tactic: simp [if_pos h, mem_union, mem_range_self]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.93493
ι : Sort ?u.93496
ι' : Sort ?u.93499
f✝ : ι → α
s t : Set α
p : α → Prop
inst✝ : DecidablePred p
f g : α → β
x : α
h : p x
⊢ (if p x then f x else g x) ∈ range f ∪ range g

case neg
α : Type u_1
β : Type u_2
γ : Type ?u.93493
ι : Sort ?u.93496
ι' : Sort ?u.93499
f✝ : ι → α
s t : Set α
p : α → Prop
inst✝ : DecidablePred p
f g : α → β
x : α
h : ¬p x
⊢ (if p x then f x else g x) ∈ range f ∪ range g

tactic: simp [if_neg h, mem_union, mem_range_self]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type ?u.93493
ι : Sort ?u.93496
ι' : Sort ?u.93499
f✝ : ι → α
s t : Set α
p : α → Prop
inst✝ : DecidablePred p
f g : α → β
x : α
h : ¬p x
⊢ (if p x then f x else g x) ∈ range f ∪ range g
Theorem: Fin.pred_succAbove
File: Mathlib/Data/Fin/Basic.lean

tactic: simp only [succAbove_above _ _ h, pred_succ]
state_before: n m : ℕ
x : Fin n
y : Fin (n + 1)
h : y ≤ ↑castSucc x
h' : optParam (↑(succAbove y) x ≠ 0) (_ : ↑(succAbove y) x ≠ 0)
⊢ pred (↑(succAbove y) x) h' = x
Theorem: Submonoid.closure_eq_mrange
File: Mathlib/GroupTheory/Submonoid/Membership.lean

tactic: rw [FreeMonoid.mrange_lift, Subtype.range_coe]
state_before: M : Type u_1
A : Type ?u.77455
B : Type ?u.77458
inst✝ : Monoid M
s : Set M
⊢ closure s = mrange (↑FreeMonoid.lift Subtype.val)
Theorem: SimpleGraph.componentComplMk_eq_of_adj
File: Mathlib/Combinatorics/SimpleGraph/Ends/Defs.lean

tactic: rw [ConnectedComponent.eq]
state_before: V : Type u
G✝ : SimpleGraph V
K L L' M : Set V
G : SimpleGraph V
v w : V
vK : ¬v ∈ K
wK : ¬w ∈ K
a : Adj G v w
⊢ componentComplMk G vK = componentComplMk G wK

tactic: apply Adj.reachable
state_before: V : Type u
G✝ : SimpleGraph V
K L L' M : Set V
G : SimpleGraph V
v w : V
vK : ¬v ∈ K
wK : ¬w ∈ K
a : Adj G v w
⊢ Reachable (induce (Kᶜ) G) { val := v, property := vK } { val := w, property := wK }

tactic: exact a
state_before: case h
V : Type u
G✝ : SimpleGraph V
K L L' M : Set V
G : SimpleGraph V
v w : V
vK : ¬v ∈ K
wK : ¬w ∈ K
a : Adj G v w
⊢ Adj (induce (Kᶜ) G) { val := v, property := vK } { val := w, property := wK }