tasksource/leandojo huggingface dataset:
Theorem: Option.not_isSome
File: Std/Data/Option/Lemmas.lean

tactic: cases a <;> simp
state_before: α✝ : Type u_1
a : Option α✝
⊢ isSome a = false ↔ isNone a = true
Theorem: Nat.pow_sub_le_descFactorial
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: rw [descFactorial_zero, pow_zero]
state_before: n : ℕ
⊢ (n + 1 - 0) ^ 0 ≤ descFactorial n 0

tactic: rw [descFactorial_succ, pow_succ, succ_sub_succ, mul_comm]
state_before: n k : ℕ
⊢ (n + 1 - (k + 1)) ^ (k + 1) ≤ descFactorial n (k + 1)

tactic: apply Nat.mul_le_mul_of_nonneg_left
state_before: n k : ℕ
⊢ (n - k) * (n - k) ^ k ≤ (n - k) * descFactorial n k

tactic: exact   (le_trans (Nat.pow_le_pow_of_le_left (tsub_le_tsub_right (le_succ _) _) k)
      (pow_sub_le_descFactorial n k))
state_before: case h₁
n k : ℕ
⊢ (n - k) ^ k ≤ descFactorial n k
Theorem: Mathlib.Meta.NormNum.isNat_minFac_3
File: Mathlib/Tactic/NormNum/Prime.lean

tactic: rw [eq_comm, ← Nat.dvd_iff_mod_eq_zero] at h2
state_before: n k : ℕ
h1 : MinFacHelper n k
h2 : 0 = n % k
⊢ IsNat (minFac n) k

tactic: exact ⟨le_antisymm (minFac_le_of_dvd h1.1.le h2) h1.2.2⟩
state_before: n k : ℕ
h1 : MinFacHelper n k
h2 : k ∣ n
⊢ IsNat (minFac n) k
Theorem: Set.sized_iUnion₂
File: Mathlib/Data/Finset/Slice.lean

tactic: simp only [Set.sized_iUnion]
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
A B : Set (Finset α)
r : ℕ
f : (i : ι) → κ i → Set (Finset α)
⊢ Sized r (⋃ (i : ι) (j : κ i), f i j) ↔ ∀ (i : ι) (j : κ i), Sized r (f i j)
Theorem: Finset.mem_symmDiff
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [symmDiff, sup_eq_union, mem_union, mem_sdiff]
state_before: α : Type u_1
β : Type ?u.285746
γ : Type ?u.285749
inst✝ : DecidableEq α
s t : Finset α
a b : α
⊢ a ∈ s ∆ t ↔ a ∈ s ∧ ¬a ∈ t ∨ a ∈ t ∧ ¬a ∈ s
Theorem: Rat.normalize_num_den'
File: Std/Data/Rat/Lemmas.lean

tactic: refine ⟨num.natAbs.gcd den, Nat.gcd_ne_zero_right nz, ?_⟩
state_before: num : Int
den : Nat
nz : den ≠ 0
⊢ ∃ d, d ≠ 0 ∧ num = (normalize num den).num * ↑d ∧ den = (normalize num den).den * d

tactic: simp [normalize_eq, Int.ediv_mul_cancel (Int.ofNat_dvd_left.2 <| Nat.gcd_dvd_left ..),
  Nat.div_mul_cancel (Nat.gcd_dvd_right ..)]
state_before: num : Int
den : Nat
nz : den ≠ 0
⊢ num = (normalize num den).num * ↑(Nat.gcd (Int.natAbs num) den) ∧
    den = (normalize num den).den * Nat.gcd (Int.natAbs num) den
Theorem: Int.mul_sub
File: Std/Data/Int/Lemmas.lean

tactic: simp [Int.sub_eq_add_neg, Int.mul_add]
state_before: a b c : Int
⊢ a * (b - c) = a * b - a * c
Theorem: ContinuousMap.Homotopic.equivalence
File: Mathlib/Topology/Homotopy/Basic.lean

tactic: apply symm
state_before: F : Type ?u.285748
X : Type u
Y : Type v
Z : Type w
Z' : Type x
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
⊢ ∀ {x y : C(X, Y)}, Homotopic x y → Homotopic y x

tactic: apply trans
state_before: F : Type ?u.285748
X : Type u
Y : Type v
Z : Type w
Z' : Type x
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
⊢ ∀ {x y z : C(X, Y)}, Homotopic x y → Homotopic y z → Homotopic x z
Theorem: Nat.periodic_coprime
File: Mathlib/Data/Nat/Periodic.lean

tactic: simp only [coprime_add_self_right, forall_const, iff_self_iff, eq_iff_iff, Periodic]
state_before: a : ℕ
⊢ Periodic (coprime a) a
Theorem: Fin.castAdd_natAdd
File: Mathlib/Data/Fin/Basic.lean

tactic: ext
state_before: n✝ m✝ p m n : ℕ
i : Fin n
⊢ ↑(castAdd p) (↑(natAdd m) i) = ↑(cast (_ : m + (n + p) = m + n + p)) (↑(natAdd m) (↑(castAdd p) i))

tactic: simp
state_before: case h
n✝ m✝ p m n : ℕ
i : Fin n
⊢ ↑(↑(castAdd p) (↑(natAdd m) i)) = ↑(↑(cast (_ : m + (n + p) = m + n + p)) (↑(natAdd m) (↑(castAdd p) i)))
Theorem: ZMod.val_mul
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n : ℕ
a b : ZMod n
⊢ val (a * b) = val a * val b % n

tactic: rw [Nat.mod_zero]
state_before: case zero
a b : ZMod Nat.zero
⊢ val (a * b) = val a * val b % Nat.zero

tactic: apply Int.natAbs_mul
state_before: case zero
a b : ZMod Nat.zero
⊢ val (a * b) = val a * val b

tactic: apply Fin.val_mul
state_before: case succ
n✝ : ℕ
a b : ZMod (Nat.succ n✝)
⊢ val (a * b) = val a * val b % Nat.succ n✝
Theorem: Finpartition.exists_equipartition_card_eq
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Equitabilise.lean

tactic: rw [← pos_iff_ne_zero] at hn
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = card s
hn : n ≠ 0
hs : n ≤ card s
⊢ ∃ P, IsEquipartition P ∧ card P.parts = n

tactic: have : (n - s.card % n) * (s.card / n) + s.card % n * (s.card / n + 1) = s.card := by
  rw [tsub_mul, mul_add, ← add_assoc,
    tsub_add_cancel_of_le (Nat.mul_le_mul_right _ (mod_lt _ hn).le), mul_one, add_comm,
    mod_add_div]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = card s
hn : 0 < n
hs : n ≤ card s
⊢ ∃ P, IsEquipartition P ∧ card P.parts = n

tactic: refine'
  ⟨(indiscrete (card_pos.1 <| hn.trans_le hs).ne_empty).equitabilise this,
    equitabilise_isEquipartition, _⟩
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = card s
hn : 0 < n
hs : n ≤ card s
this : (n - card s % n) * (card s / n) + card s % n * (card s / n + 1) = card s
⊢ ∃ P, IsEquipartition P ∧ card P.parts = n

tactic: rw [card_parts_equitabilise _ _ (Nat.div_pos hs hn).ne', tsub_add_cancel_of_le (mod_lt _ hn).le]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = card s
hn : 0 < n
hs : n ≤ card s
this : (n - card s % n) * (card s / n) + card s % n * (card s / n + 1) = card s
⊢ card (equitabilise this).parts = n

tactic: rw [tsub_mul, mul_add, ← add_assoc,
  tsub_add_cancel_of_le (Nat.mul_le_mul_right _ (mod_lt _ hn).le), mul_one, add_comm,
  mod_add_div]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = card s
hn : 0 < n
hs : n ≤ card s
⊢ (n - card s % n) * (card s / n) + card s % n * (card s / n + 1) = card s
Theorem: Mathlib.Tactic.RingNF.int_rawCast_2
File: Mathlib/Tactic/Ring/RingNF.lean

tactic: simp [Int.negOfNat_eq, OfNat.ofNat]
state_before: R✝ : Type ?u.78183
inst✝² : CommSemiring R✝
n : ℕ
R : Type u_1
inst✝¹ : Ring R
inst✝ : Nat.AtLeastTwo n
⊢ Int.rawCast (Int.negOfNat n) = -OfNat.ofNat n
Theorem: Int.fmod_eq_of_lt
File: Std/Data/Int/DivMod.lean

tactic: rw [fmod_eq_emod _ (Int.le_trans H1 (Int.le_of_lt H2)), emod_eq_of_lt H1 H2]
state_before: a b : Int
H1 : 0 ≤ a
H2 : a < b
⊢ fmod a b = a
Theorem: Basis.mapCoeffs_apply
File: Mathlib/LinearAlgebra/Basis.lean

tactic: letI : Module R' R := Module.compHom R (↑f.symm : R' →+* R)
state_before: ι : Type u_2
ι' : Type ?u.297290
R : Type u_4
R₂ : Type ?u.297296
K : Type ?u.297299
M : Type u_1
M' : Type ?u.297305
M'' : Type ?u.297308
V : Type u
V' : Type ?u.297313
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
R' : Type u_3
inst✝¹ : Semiring R'
inst✝ : Module R' M
f : R ≃+* R'
h : ∀ (c : R) (x : M), ↑f c • x = c • x
i : ι
⊢ ↑(mapCoeffs b f h).repr (↑b i) = Finsupp.single i 1

tactic: haveI : IsScalarTower R' R M :=
{ smul_assoc := fun x y z => by
    change (f.symm x * y) • z = x • (y • z)
    rw [mul_smul, ← h, f.apply_symm_apply] }
state_before: ι : Type u_2
ι' : Type ?u.297290
R : Type u_4
R₂ : Type ?u.297296
K : Type ?u.297299
M : Type u_1
M' : Type ?u.297305
M'' : Type ?u.297308
V : Type u
V' : Type ?u.297313
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
R' : Type u_3
inst✝¹ : Semiring R'
inst✝ : Module R' M
f : R ≃+* R'
h : ∀ (c : R) (x : M), ↑f c • x = c • x
i : ι
this : Module R' R := Module.compHom R ↑(RingEquiv.symm f)
⊢ ↑(mapCoeffs b f h).repr (↑b i) = Finsupp.single i 1

tactic: simp
state_before: ι : Type u_2
ι' : Type ?u.297290
R : Type u_4
R₂ : Type ?u.297296
K : Type ?u.297299
M : Type u_1
M' : Type ?u.297305
M'' : Type ?u.297308
V : Type u
V' : Type ?u.297313
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
R' : Type u_3
inst✝¹ : Semiring R'
inst✝ : Module R' M
f : R ≃+* R'
h : ∀ (c : R) (x : M), ↑f c • x = c • x
i : ι
this✝ : Module R' R := Module.compHom R ↑(RingEquiv.symm f)
this : IsScalarTower R' R M
⊢ ↑(mapCoeffs b f h).repr (↑b i) = Finsupp.single i 1

tactic: change (f.symm x * y) • z = x • (y • z)
state_before: ι : Type u_2
ι' : Type ?u.297290
R : Type u_4
R₂ : Type ?u.297296
K : Type ?u.297299
M : Type u_1
M' : Type ?u.297305
M'' : Type ?u.297308
V : Type u
V' : Type ?u.297313
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x✝ : M
R' : Type u_3
inst✝¹ : Semiring R'
inst✝ : Module R' M
f : R ≃+* R'
h : ∀ (c : R) (x : M), ↑f c • x = c • x
i : ι
this : Module R' R := Module.compHom R ↑(RingEquiv.symm f)
x : R'
y : R
z : M
⊢ (x • y) • z = x • y • z

tactic: rw [mul_smul, ← h, f.apply_symm_apply]
state_before: ι : Type u_2
ι' : Type ?u.297290
R : Type u_4
R₂ : Type ?u.297296
K : Type ?u.297299
M : Type u_1
M' : Type ?u.297305
M'' : Type ?u.297308
V : Type u
V' : Type ?u.297313
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x✝ : M
R' : Type u_3
inst✝¹ : Semiring R'
inst✝ : Module R' M
f : R ≃+* R'
h : ∀ (c : R) (x : M), ↑f c • x = c • x
i : ι
this : Module R' R := Module.compHom R ↑(RingEquiv.symm f)
x : R'
y : R
z : M
⊢ (↑(RingEquiv.symm f) x * y) • z = x • y • z
Theorem: Finset.Polynomial.gcd_div_eq_one
File: Mathlib/Algebra/GCDMonoid/Div.lean

tactic: obtain ⟨g, he, hg⟩ := Finset.extract_gcd f ⟨x, hx⟩
state_before: K : Type u_2
inst✝ : Field K
β : Type u_1
f : β → Polynomial K
s : Finset β
x : β
hx : x ∈ s
hfz : f x ≠ 0
⊢ (gcd s fun b => f b / gcd s f) = 1

tactic: refine' (Finset.gcd_congr rfl fun a ha => _).trans hg
state_before: case intro.intro
K : Type u_2
inst✝ : Field K
β : Type u_1
f : β → Polynomial K
s : Finset β
x : β
hx : x ∈ s
hfz : f x ≠ 0
g : β → Polynomial K
he : ∀ (b : β), b ∈ s → f b = gcd s f * g b
hg : gcd s g = 1
⊢ (gcd s fun b => f b / gcd s f) = 1

tactic: rw [he a ha, EuclideanDomain.mul_div_cancel_left]
state_before: case intro.intro
K : Type u_2
inst✝ : Field K
β : Type u_1
f : β → Polynomial K
s : Finset β
x : β
hx : x ∈ s
hfz : f x ≠ 0
g : β → Polynomial K
he : ∀ (b : β), b ∈ s → f b = gcd s f * g b
hg : gcd s g = 1
a : β
ha : a ∈ s
⊢ f a / gcd s f = g a

tactic: exact mt Finset.gcd_eq_zero_iff.1 fun h => hfz <| h x hx
state_before: case intro.intro.a0
K : Type u_2
inst✝ : Field K
β : Type u_1
f : β → Polynomial K
s : Finset β
x : β
hx : x ∈ s
hfz : f x ≠ 0
g : β → Polynomial K
he : ∀ (b : β), b ∈ s → f b = gcd s f * g b
hg : gcd s g = 1
a : β
ha : a ∈ s
⊢ gcd s f ≠ 0
Theorem: Action.leftUnitor_inv_hom
File: Mathlib/RepresentationTheory/Action.lean

tactic: dsimp [Monoidal.transport_leftUnitor]
state_before: V : Type (u + 1)
inst✝¹ : LargeCategory V
G : MonCat
inst✝ : MonoidalCategory V
X : Action V G
⊢ (λ_ X).inv.hom = (λ_ X.V).inv

tactic: simp
state_before: V : Type (u + 1)
inst✝¹ : LargeCategory V
G : MonCat
inst✝ : MonoidalCategory V
X : Action V G
⊢ 𝟙 X.V ≫ (λ_ X.V).inv ≫ (𝟙 (𝟙_ V) ⊗ 𝟙 X.V) = (λ_ X.V).inv
Theorem: tendstoUniformlyOn_singleton_iff_tendsto
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: simp_rw [tendstoUniformlyOn_iff_tendsto, Uniform.tendsto_nhds_right, tendsto_def]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
⊢ TendstoUniformlyOn F f p {x} ↔ Tendsto (fun n => F n x) p (𝓝 (f x))

tactic: exact forall₂_congr fun u _ => by simp [mem_prod_principal, preimage]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
⊢ (∀ (s : Set (β × β)), s ∈ 𝓤 β → (fun q => (f q.snd, F q.fst q.snd)) ⁻¹' s ∈ p ×ˢ 𝓟 {x}) ↔
    ∀ (s : Set (β × β)), s ∈ 𝓤 β → (fun x_1 => (f x, F x_1 x)) ⁻¹' s ∈ p

tactic: simp [mem_prod_principal, preimage]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
u : Set (β × β)
x✝ : u ∈ 𝓤 β
⊢ (fun q => (f q.snd, F q.fst q.snd)) ⁻¹' u ∈ p ×ˢ 𝓟 {x} ↔ (fun x_1 => (f x, F x_1 x)) ⁻¹' u ∈ p
Theorem: Basis.mk_eq_rank
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: haveI := nontrivial_of_invariantBasisNumber R
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.409886
R : Type u
inst✝³ : Ring R
inst✝² : StrongRankCondition R
M : Type v
inst✝¹ : AddCommGroup M
inst✝ : Module R M
v : Basis ι R M
⊢ lift (#ι) = lift (Module.rank R M)

tactic: rw [← v.mk_range_eq_rank, Cardinal.mk_range_eq_of_injective v.injective]
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.409886
R : Type u
inst✝³ : Ring R
inst✝² : StrongRankCondition R
M : Type v
inst✝¹ : AddCommGroup M
inst✝ : Module R M
v : Basis ι R M
this : Nontrivial R
⊢ lift (#ι) = lift (Module.rank R M)
Theorem: Pell.xn_modEq_x2n_sub_lem
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: have h1 : xz a1 n ∣ d a1 * yz a1 n * yz a1 (n - j) + xz a1 j := by
  rw [yz_sub _ h, mul_sub_left_distrib, sub_add_eq_add_sub]
  exact
    dvd_sub
      (by
        delta xz; delta yz
        rw [mul_comm (xn _ _ : ℤ)]
        exact_mod_cast (xn_modEq_x2n_add_lem _ n j))
      ((dvd_mul_right _ _).mul_left _)
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]

tactic: rw [two_mul, add_tsub_assoc_of_le h, xn_add, add_assoc, ← zero_add 0]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
h1 : xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * yz a1 (n - j) + xz a1 j
⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]

tactic: exact
  (dvd_mul_right _ _).modEq_zero_nat.add
    (Int.coe_nat_dvd.1 <| by simpa [xz, yz] using h1).modEq_zero_nat
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
h1 : xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * yz a1 (n - j) + xz a1 j
⊢ xn a1 n * xn a1 (n - j) + (Pell.d a1 * yn a1 n * yn a1 (n - j) + xn a1 j) ≡ 0 + 0 [MOD xn a1 n]

tactic: rw [yz_sub _ h, mul_sub_left_distrib, sub_add_eq_add_sub]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
⊢ xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * yz a1 (n - j) + xz a1 j

tactic: exact
  dvd_sub
    (by
      delta xz; delta yz
      rw [mul_comm (xn _ _ : ℤ)]
      exact_mod_cast (xn_modEq_x2n_add_lem _ n j))
    ((dvd_mul_right _ _).mul_left _)
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
⊢ xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * (xz a1 j * yz a1 n) + xz a1 j - ↑(Pell.d a1) * yz a1 n * (xz a1 n * yz a1 j)

tactic: delta xz
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
⊢ xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * (xz a1 j * yz a1 n) + xz a1 j

tactic: delta yz
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
⊢ ↑(xn a1 n) ∣ ↑(Pell.d a1) * yz a1 n * (↑(xn a1 j) * yz a1 n) + ↑(xn a1 j)

tactic: rw [mul_comm (xn _ _ : ℤ)]
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
⊢ ↑(xn a1 n) ∣ ↑(Pell.d a1) * ↑(yn a1 n) * (↑(xn a1 j) * ↑(yn a1 n)) + ↑(xn a1 j)

tactic: exact_mod_cast (xn_modEq_x2n_add_lem _ n j)
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
⊢ ↑(xn a1 n) ∣ ↑(Pell.d a1) * ↑(yn a1 n) * (↑(yn a1 n) * ↑(xn a1 j)) + ↑(xn a1 j)

tactic: simpa [xz, yz] using h1
state_before: a : ℕ
a1 : 1 < a
n j : ℕ
h : j ≤ n
h1 : xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * yz a1 (n - j) + xz a1 j
⊢ ↑(xn a1 n) ∣ ↑(Pell.d a1 * yn a1 n * yn a1 (n - j) + xn a1 j)
Theorem: MulChar.IsQuadratic.sq_eq_one
File: Mathlib/NumberTheory/LegendreSymbol/MulCharacter.lean

tactic: rw [← mul_left_inv χ, pow_two, hχ.inv]
state_before: R : Type u
inst✝² : CommRing R
R' : Type v
inst✝¹ : CommRing R'
R'' : Type w
inst✝ : CommRing R''
χ : MulChar R R'
hχ : IsQuadratic χ
⊢ χ ^ 2 = 1
Theorem: SimpleGraph.Hom.mapEdgeSet.injective
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: rintro ⟨e₁, h₁⟩ ⟨e₂, h₂⟩
state_before: ι : Sort ?u.403479
𝕜 : Type ?u.403482
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
f : G →g G'
hinj : Injective ↑f
⊢ Injective (mapEdgeSet f)

tactic: dsimp [Hom.mapEdgeSet]
state_before: case mk.mk
ι : Sort ?u.403479
𝕜 : Type ?u.403482
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
f : G →g G'
hinj : Injective ↑f
e₁ : Sym2 V
h₁ : e₁ ∈ edgeSet G
e₂ : Sym2 V
h₂ : e₂ ∈ edgeSet G
⊢ mapEdgeSet f { val := e₁, property := h₁ } = mapEdgeSet f { val := e₂, property := h₂ } →
    { val := e₁, property := h₁ } = { val := e₂, property := h₂ }

tactic: repeat' rw [Subtype.mk_eq_mk]
state_before: case mk.mk
ι : Sort ?u.403479
𝕜 : Type ?u.403482
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
f : G →g G'
hinj : Injective ↑f
e₁ : Sym2 V
h₁ : e₁ ∈ edgeSet G
e₂ : Sym2 V
h₂ : e₂ ∈ edgeSet G
⊢ { val := Sym2.map (↑f) e₁, property := (_ : Sym2.map ↑f ↑{ val := e₁, property := h₁ } ∈ edgeSet G') } =
      { val := Sym2.map (↑f) e₂, property := (_ : Sym2.map ↑f ↑{ val := e₂, property := h₂ } ∈ edgeSet G') } →
    { val := e₁, property := h₁ } = { val := e₂, property := h₂ }

tactic: apply Sym2.map.injective hinj
state_before: case mk.mk
ι : Sort ?u.403479
𝕜 : Type ?u.403482
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
f : G →g G'
hinj : Injective ↑f
e₁ : Sym2 V
h₁ : e₁ ∈ edgeSet G
e₂ : Sym2 V
h₂ : e₂ ∈ edgeSet G
⊢ Sym2.map (↑f) e₁ = Sym2.map (↑f) e₂ → e₁ = e₂

tactic: rw [Subtype.mk_eq_mk]
state_before: case mk.mk
ι : Sort ?u.403479
𝕜 : Type ?u.403482
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
f : G →g G'
hinj : Injective ↑f
e₁ : Sym2 V
h₁ : e₁ ∈ edgeSet G
e₂ : Sym2 V
h₂ : e₂ ∈ edgeSet G
⊢ Sym2.map (↑f) e₁ = Sym2.map (↑f) e₂ → e₁ = e₂
Theorem: Behrend.two_div_one_sub_two_div_e_le_eight
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: rw [div_le_iff, mul_sub, mul_one, mul_div_assoc', le_sub_comm, div_le_iff (exp_pos _)]
state_before: α : Type ?u.648739
β : Type ?u.648742
n d k N : ℕ
x : Fin n → ℕ
⊢ 2 / (1 - 2 / exp 1) ≤ 8

tactic: rw [sub_pos, div_lt_one] <;> exact exp_one_gt_d9.trans' (by norm_num)
state_before: α : Type ?u.648739
β : Type ?u.648742
n d k N : ℕ
x : Fin n → ℕ
⊢ 0 < 1 - 2 / exp 1

tactic: have : 16 < 6 * (2.7182818283 : ℝ) := by norm_num
state_before: α : Type ?u.648739
β : Type ?u.648742
n d k N : ℕ
x : Fin n → ℕ
⊢ 8 * 2 ≤ (8 - 2) * exp 1

tactic: linarith [exp_one_gt_d9]
state_before: α : Type ?u.648739
β : Type ?u.648742
n d k N : ℕ
x : Fin n → ℕ
this : 16 < 6 * 2.7182818283
⊢ 8 * 2 ≤ (8 - 2) * exp 1

tactic: norm_num
state_before: α : Type ?u.648739
β : Type ?u.648742
n d k N : ℕ
x : Fin n → ℕ
⊢ 16 < 6 * 2.7182818283

tactic: norm_num
state_before: α : Type ?u.648739
β : Type ?u.648742
n d k N : ℕ
x : Fin n → ℕ
⊢ 0 < 2.7182818283
Theorem: LocalHomeomorph.restr_source'
File: Mathlib/Topology/LocalHomeomorph.lean

tactic: rw [e.restr_source, hs.interior_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.53487
δ : Type ?u.53490
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e' : LocalHomeomorph β γ
s : Set α
hs : IsOpen s
⊢ (LocalHomeomorph.restr e s).toLocalEquiv.source = e.source ∩ s
Theorem: Balanced.absorbs_self
File: Mathlib/Analysis/LocallyConvex/Basic.lean

tactic: refine' ⟨1, zero_lt_one, fun a ha x hx => _⟩
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.76198
E : Type u_2
ι : Sort ?u.76204
κ : ι → Sort ?u.76209
inst✝⁶ : NormedField 𝕜
inst✝⁵ : NormedRing 𝕝
inst✝⁴ : NormedSpace 𝕜 𝕝
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : SMulWithZero 𝕝 E
inst✝ : IsScalarTower 𝕜 𝕝 E
s t u v A B : Set E
x : E
a b : 𝕜
hA : Balanced 𝕜 A
⊢ Absorbs 𝕜 A A

tactic: rw [mem_smul_set_iff_inv_smul_mem₀ (norm_pos_iff.1 <| zero_lt_one.trans_le ha)]
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.76198
E : Type u_2
ι : Sort ?u.76204
κ : ι → Sort ?u.76209
inst✝⁶ : NormedField 𝕜
inst✝⁵ : NormedRing 𝕝
inst✝⁴ : NormedSpace 𝕜 𝕝
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : SMulWithZero 𝕝 E
inst✝ : IsScalarTower 𝕜 𝕝 E
s t u v A B : Set E
x✝ : E
a✝ b : 𝕜
hA : Balanced 𝕜 A
a : 𝕜
ha : 1 ≤ ‖a‖
x : E
hx : x ∈ A
⊢ x ∈ a • A

tactic: refine' hA a⁻¹ _ (smul_mem_smul_set hx)
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.76198
E : Type u_2
ι : Sort ?u.76204
κ : ι → Sort ?u.76209
inst✝⁶ : NormedField 𝕜
inst✝⁵ : NormedRing 𝕝
inst✝⁴ : NormedSpace 𝕜 𝕝
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : SMulWithZero 𝕝 E
inst✝ : IsScalarTower 𝕜 𝕝 E
s t u v A B : Set E
x✝ : E
a✝ b : 𝕜
hA : Balanced 𝕜 A
a : 𝕜
ha : 1 ≤ ‖a‖
x : E
hx : x ∈ A
⊢ a⁻¹ • x ∈ A

tactic: rw [norm_inv]
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.76198
E : Type u_2
ι : Sort ?u.76204
κ : ι → Sort ?u.76209
inst✝⁶ : NormedField 𝕜
inst✝⁵ : NormedRing 𝕝
inst✝⁴ : NormedSpace 𝕜 𝕝
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : SMulWithZero 𝕝 E
inst✝ : IsScalarTower 𝕜 𝕝 E
s t u v A B : Set E
x✝ : E
a✝ b : 𝕜
hA : Balanced 𝕜 A
a : 𝕜
ha : 1 ≤ ‖a‖
x : E
hx : x ∈ A
⊢ ‖a⁻¹‖ ≤ 1

tactic: exact inv_le_one ha
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.76198
E : Type u_2
ι : Sort ?u.76204
κ : ι → Sort ?u.76209
inst✝⁶ : NormedField 𝕜
inst✝⁵ : NormedRing 𝕝
inst✝⁴ : NormedSpace 𝕜 𝕝
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : SMulWithZero 𝕝 E
inst✝ : IsScalarTower 𝕜 𝕝 E
s t u v A B : Set E
x✝ : E
a✝ b : 𝕜
hA : Balanced 𝕜 A
a : 𝕜
ha : 1 ≤ ‖a‖
x : E
hx : x ∈ A
⊢ ‖a‖⁻¹ ≤ 1
Theorem: Turing.Tape.map_mk₂
File: Mathlib/Computability/TuringMachine.lean

tactic: simp only [Tape.mk₂, Tape.map_mk', ListBlank.map_mk]
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
L R : List Γ
⊢ map f (mk₂ L R) = mk₂ (List.map f.f L) (List.map f.f R)
Theorem: Sum.id_traverse
File: Mathlib/Control/Traversable/Instances.lean

tactic: cases x <;> rfl
state_before: σ✝ : Type u
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : Applicative G
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
σ α : Type u_1
x : σ ⊕ α
⊢ Sum.traverse pure x = x
Theorem: UpperSet.map_Ioi
File: Mathlib/Order/UpperLower/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.112405
ι : Sort ?u.112408
κ : ι → Sort ?u.112413
inst✝¹ : Preorder α
inst✝ : Preorder β
s : UpperSet α
a✝ b : α
f : α ≃o β
a : α
⊢ ↑(map f) (Ioi a) = Ioi (↑f a)

tactic: simp
state_before: case a.h
α : Type u_1
β : Type u_2
γ : Type ?u.112405
ι : Sort ?u.112408
κ : ι → Sort ?u.112413
inst✝¹ : Preorder α
inst✝ : Preorder β
s : UpperSet α
a✝ b : α
f : α ≃o β
a : α
x✝ : β
⊢ x✝ ∈ ↑(↑(map f) (Ioi a)) ↔ x✝ ∈ ↑(Ioi (↑f a))
Theorem: List.length_ofFn
File: Mathlib/Data/List/OfFn.lean

tactic: simp [ofFn]
state_before: α : Type u
n : ℕ
f : Fin n → α
⊢ length (ofFn f) = n