tasksource/leandojo huggingface dataset:
Theorem: EReal.range_coe
File: Mathlib/Data/Real/EReal.lean

tactic: ext x
state_before: ⊢ range Real.toEReal = {⊥, ⊤}ᶜ

tactic: induction x using EReal.rec <;> simp
state_before: case h
x : EReal
⊢ x ∈ range Real.toEReal ↔ x ∈ {⊥, ⊤}ᶜ
Theorem: MulAction.zpow_smul_eq_iff_minimalPeriod_dvd
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: cases n
state_before: α : Type u_2
β : Type u_1
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
n : ℤ
⊢ a ^ n • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ n

tactic: rw [Int.ofNat_eq_coe, zpow_ofNat, Int.coe_nat_dvd, pow_smul_eq_iff_minimalPeriod_dvd]
state_before: case ofNat
α : Type u_2
β : Type u_1
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
a✝ : ℕ
⊢ a ^ Int.ofNat a✝ • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ Int.ofNat a✝

tactic: rw [Int.negSucc_coe, zpow_neg, zpow_ofNat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
  pow_smul_eq_iff_minimalPeriod_dvd]
state_before: case negSucc
α : Type u_2
β : Type u_1
inst✝¹ : Group α
inst✝ : MulAction α β
a : α
b : β
a✝ : ℕ
⊢ a ^ Int.negSucc a✝ • b = b ↔ ↑(minimalPeriod ((fun x x_1 => x • x_1) a) b) ∣ Int.negSucc a✝
Theorem: MeasurableEmbedding.aemeasurable_comp_iff
File: Mathlib/MeasureTheory/Measure/AEMeasurable.lean

tactic: refine' ⟨fun H => _, hg.measurable.comp_aemeasurable⟩
state_before: ι : Type ?u.3461513
α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.3461525
R : Type ?u.3461528
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
g : β → γ
hg : MeasurableEmbedding g
μ : MeasureTheory.Measure α
⊢ AEMeasurable (g ∘ f) ↔ AEMeasurable f

tactic: suffices AEMeasurable ((rangeSplitting g ∘ rangeFactorization g) ∘ f) μ by
  rwa [(rightInverse_rangeSplitting hg.injective).comp_eq_id] at this
state_before: ι : Type ?u.3461513
α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.3461525
R : Type ?u.3461528
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
g : β → γ
hg : MeasurableEmbedding g
μ : MeasureTheory.Measure α
H : AEMeasurable (g ∘ f)
⊢ AEMeasurable f

tactic: exact hg.measurable_rangeSplitting.comp_aemeasurable H.subtype_mk
state_before: ι : Type ?u.3461513
α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.3461525
R : Type ?u.3461528
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
g : β → γ
hg : MeasurableEmbedding g
μ : MeasureTheory.Measure α
H : AEMeasurable (g ∘ f)
⊢ AEMeasurable ((rangeSplitting g ∘ rangeFactorization g) ∘ f)

tactic: rwa [(rightInverse_rangeSplitting hg.injective).comp_eq_id] at this
state_before: ι : Type ?u.3461513
α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.3461525
R : Type ?u.3461528
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f g✝ : α → β
μ✝ ν : MeasureTheory.Measure α
g : β → γ
hg : MeasurableEmbedding g
μ : MeasureTheory.Measure α
H : AEMeasurable (g ∘ f)
this : AEMeasurable ((rangeSplitting g ∘ rangeFactorization g) ∘ f)
⊢ AEMeasurable f
Theorem: Quiver.Symmetrify.lift_spec
File: Mathlib/Combinatorics/Quiver/Symmetric.lean

tactic: fapply Prefunctor.ext
state_before: U : Type ?u.7420
V : Type u_2
W : Type ?u.7426
inst✝⁴ : Quiver U
inst✝³ : Quiver V
inst✝² : Quiver W
V' : Type u_1
inst✝¹ : Quiver V'
inst✝ : HasReverse V'
φ : V ⥤q V'
⊢ of ⋙q lift φ = φ

tactic: rintro X
state_before: case h_obj
U : Type ?u.7420
V : Type u_2
W : Type ?u.7426
inst✝⁴ : Quiver U
inst✝³ : Quiver V
inst✝² : Quiver W
V' : Type u_1
inst✝¹ : Quiver V'
inst✝ : HasReverse V'
φ : V ⥤q V'
⊢ ∀ (X : V), (of ⋙q lift φ).obj X = φ.obj X

tactic: rfl
state_before: case h_obj
U : Type ?u.7420
V : Type u_2
W : Type ?u.7426
inst✝⁴ : Quiver U
inst✝³ : Quiver V
inst✝² : Quiver W
V' : Type u_1
inst✝¹ : Quiver V'
inst✝ : HasReverse V'
φ : V ⥤q V'
X : V
⊢ (of ⋙q lift φ).obj X = φ.obj X

tactic: rintro X Y f
state_before: case h_map
U : Type ?u.7420
V : Type u_2
W : Type ?u.7426
inst✝⁴ : Quiver U
inst✝³ : Quiver V
inst✝² : Quiver W
V' : Type u_1
inst✝¹ : Quiver V'
inst✝ : HasReverse V'
φ : V ⥤q V'
⊢ ∀ (X Y : V) (f : X ⟶ Y),
    (of ⋙q lift φ).map f =
      Eq.recOn (_ : φ.obj Y = (of ⋙q lift φ).obj Y) (Eq.recOn (_ : φ.obj X = (of ⋙q lift φ).obj X) (φ.map f))

tactic: rfl
state_before: case h_map
U : Type ?u.7420
V : Type u_2
W : Type ?u.7426
inst✝⁴ : Quiver U
inst✝³ : Quiver V
inst✝² : Quiver W
V' : Type u_1
inst✝¹ : Quiver V'
inst✝ : HasReverse V'
φ : V ⥤q V'
X Y : V
f : X ⟶ Y
⊢ (of ⋙q lift φ).map f =
    Eq.recOn (_ : φ.obj Y = (of ⋙q lift φ).obj Y) (Eq.recOn (_ : φ.obj X = (of ⋙q lift φ).obj X) (φ.map f))
Theorem: Set.iUnion_nonempty_self
File: Mathlib/Data/Set/Lattice.lean

tactic: rw [iUnion_nonempty_index, biUnion_self]
state_before: α : Type u_1
β : Type ?u.99755
γ : Type ?u.99758
ι : Sort ?u.99761
ι' : Sort ?u.99764
ι₂ : Sort ?u.99767
κ : ι → Sort ?u.99772
κ₁ : ι → Sort ?u.99777
κ₂ : ι → Sort ?u.99782
κ' : ι' → Sort ?u.99787
s : Set α
⊢ (⋃ (_ : Set.Nonempty s), s) = s
Theorem: Submodule.ker_liftQ_eq_bot
File: Mathlib/LinearAlgebra/Quotient.lean

tactic: rw [ker_liftQ, le_antisymm h h', mkQ_map_self]
state_before: R : Type u_1
M : Type u_3
r : R
x y : M
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
p p' : Submodule R M
R₂ : Type u_2
M₂ : Type u_4
inst✝² : Ring R₂
inst✝¹ : AddCommGroup M₂
inst✝ : Module R₂ M₂
τ₁₂ : R →+* R₂
q : Submodule R₂ M₂
f : M →ₛₗ[τ₁₂] M₂
h : p ≤ ker f
h' : ker f ≤ p
⊢ ker (liftQ p f h) = ⊥
Theorem: MvPolynomial.weightedHomogeneousComponent_C_mul
File: Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

tactic: simp only [C_mul', LinearMap.map_smul]
state_before: R : Type u_2
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_1
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
n : M
r : R
⊢ ↑(weightedHomogeneousComponent w n) (↑C r * φ) = ↑C r * ↑(weightedHomogeneousComponent w n) φ
Theorem: Int.isCompl_even_odd
File: Mathlib/Data/Int/Parity.lean

tactic: simp [← Set.compl_setOf, isCompl_compl]
state_before: m n : ℤ
⊢ IsCompl {n | Even n} {n | Odd n}
Theorem: pow_eq_pow_iff_modEq
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: wlog hmn : m ≤ n generalizing m n
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝ : LeftCancelMonoid G
⊢ x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x]

tactic: obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le hmn
state_before: G : Type u
A : Type v
x y : G
a b : A
n✝ m✝ : ℕ
inst✝ : LeftCancelMonoid G
n m : ℕ
hmn : m ≤ n
⊢ x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x]

tactic: rw [← mul_one (x ^ m), pow_add, mul_left_cancel_iff, pow_eq_one_iff_modEq]
state_before: case intro
G : Type u
A : Type v
x y : G
a b : A
n m✝ : ℕ
inst✝ : LeftCancelMonoid G
m k : ℕ
hmn : m ≤ m + k
⊢ x ^ (m + k) = x ^ m ↔ m + k ≡ m [MOD orderOf x]

tactic: exact ⟨fun h => Nat.ModEq.add_left _ h, fun h => Nat.ModEq.add_left_cancel' _ h⟩
state_before: case intro
G : Type u
A : Type v
x y : G
a b : A
n m✝ : ℕ
inst✝ : LeftCancelMonoid G
m k : ℕ
hmn : m ≤ m + k
⊢ k ≡ 0 [MOD orderOf x] ↔ m + k ≡ m [MOD orderOf x]

tactic: rw [eq_comm, ModEq.comm, this (le_of_not_le hmn)]
state_before: case inr
G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝ : LeftCancelMonoid G
this : ∀ {n m : ℕ}, m ≤ n → (x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x])
hmn : ¬m ≤ n
⊢ x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x]
Theorem: Submonoid.exists_multiset_of_mem_closure
File: Mathlib/GroupTheory/Submonoid/Membership.lean

tactic: obtain ⟨l, h1, h2⟩ := exists_list_of_mem_closure hx
state_before: M✝ : Type ?u.82426
A : Type ?u.82429
B : Type ?u.82432
inst✝¹ : Monoid M✝
M : Type u_1
inst✝ : CommMonoid M
s : Set M
x : M
hx : x ∈ closure s
⊢ ∃ l x_1, Multiset.prod l = x

tactic: exact ⟨l, h1, (Multiset.coe_prod l).trans h2⟩
state_before: case intro.intro
M✝ : Type ?u.82426
A : Type ?u.82429
B : Type ?u.82432
inst✝¹ : Monoid M✝
M : Type u_1
inst✝ : CommMonoid M
s : Set M
x : M
hx : x ∈ closure s
l : List M
h1 : ∀ (y : M), y ∈ l → y ∈ s
h2 : List.prod l = x
⊢ ∃ l x_1, Multiset.prod l = x
Theorem: Finset.disjSups_inter_subset_left
File: Mathlib/Data/Finset/Sups.lean

tactic: simpa only [disjSups, inter_product, filter_inter_distrib] using image_inter_subset _ _ _
state_before: α : Type u_1
inst✝³ : DecidableEq α
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ (s₁ ∩ s₂) ○ t ⊆ s₁ ○ t ∩ s₂ ○ t
Theorem: MeasureTheory.weightedSMul_nonneg
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: simp only [weightedSMul, Algebra.id.smul_eq_mul, coe_smul', id.def, coe_id', Pi.smul_apply]
state_before: α : Type u_1
E : Type ?u.79725
F : Type ?u.79728
𝕜 : Type ?u.79731
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
m : MeasurableSpace α
μ : Measure α
s : Set α
x : ℝ
hx : 0 ≤ x
⊢ 0 ≤ ↑(weightedSMul μ s) x

tactic: exact mul_nonneg toReal_nonneg hx
state_before: α : Type u_1
E : Type ?u.79725
F : Type ?u.79728
𝕜 : Type ?u.79731
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
m : MeasurableSpace α
μ : Measure α
s : Set α
x : ℝ
hx : 0 ≤ x
⊢ 0 ≤ ENNReal.toReal (↑↑μ s) * x
Theorem: List.lookmap.go_append
File: Mathlib/Data/List/Basic.lean

tactic: cases l with
| nil => rfl
| cons hd tl =>
  rw [lookmap, go, go]
  cases f hd with
  | none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl
  | some a => rfl
state_before: ι : Type ?u.340195
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
l : List α
acc : Array α
⊢ go f l acc = Array.toListAppend acc (lookmap f l)

tactic: rfl
state_before: case nil
ι : Type ?u.340195
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
acc : Array α
⊢ go f [] acc = Array.toListAppend acc (lookmap f [])

tactic: rw [lookmap, go, go]
state_before: case cons
ι : Type ?u.340195
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ go f (hd :: tl) acc = Array.toListAppend acc (lookmap f (hd :: tl))

tactic: cases f hd with
| none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl
| some a => rfl
state_before: case cons
ι : Type ?u.340195
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ (match f hd with
    | some b => Array.toListAppend acc (b :: tl)
    | none => go f tl (Array.push acc hd)) =
    Array.toListAppend acc
      (match f hd with
      | some b => Array.toListAppend #[] (b :: tl)
      | none => go f tl (Array.push #[] hd))

tactic: simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]
state_before: case cons.none
ι : Type ?u.340195
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ (match none with
    | some b => Array.toListAppend acc (b :: tl)
    | none => go f tl (Array.push acc hd)) =
    Array.toListAppend acc
      (match none with
      | some b => Array.toListAppend #[] (b :: tl)
      | none => go f tl (Array.push #[] hd))

tactic: rfl
state_before: case cons.none
ι : Type ?u.340195
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
⊢ acc.data ++ ([hd] ++ lookmap f tl) = acc.data ++ (#[].data ++ ([hd] ++ lookmap f tl))

tactic: rfl
state_before: case cons.some
ι : Type ?u.340195
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
acc : Array α
hd : α
tl : List α
a : α
⊢ (match some a with
    | some b => Array.toListAppend acc (b :: tl)
    | none => go f tl (Array.push acc hd)) =
    Array.toListAppend acc
      (match some a with
      | some b => Array.toListAppend #[] (b :: tl)
      | none => go f tl (Array.push #[] hd))
Theorem: bihimp_bihimp_bihimp_comm
File: Mathlib/Order/SymmDiff.lean

tactic: simp_rw [bihimp_assoc, bihimp_left_comm]
state_before: ι : Type ?u.81809
α : Type u_1
β : Type ?u.81815
π : ι → Type ?u.81820
inst✝ : BooleanAlgebra α
a b c d : α
⊢ a ⇔ b ⇔ (c ⇔ d) = a ⇔ c ⇔ (b ⇔ d)
Theorem: EMetric.mem_ball'
File: Mathlib/Topology/MetricSpace/EMetricSpace.lean

tactic: rw [edist_comm, mem_ball]
state_before: α : Type u
β : Type v
X : Type ?u.186781
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
⊢ y ∈ ball x ε ↔ edist x y < ε
Theorem: Finset.sym2_singleton
File: Mathlib/Data/Finset/Sym.lean

tactic: rw [Finset.sym2, singleton_product_singleton, image_singleton, Sym2.diag, Quotient.mk']
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b : α
m : Sym2 α
a : α
⊢ Finset.sym2 {a} = {Sym2.diag a}
Theorem: ProjectiveSpectrum.isClosed_iff_zeroLocus
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: rw [← isOpen_compl_iff, isOpen_iff, compl_compl]
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
Z : Set (ProjectiveSpectrum 𝒜)
⊢ IsClosed Z ↔ ∃ s, Z = zeroLocus 𝒜 s
Theorem: Subgroup.comap_normalizer_eq_of_injective_of_le_range
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: apply Subgroup.map_injective hf
state_before: G : Type u_2
G' : Type ?u.624266
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.624275
inst✝² : AddGroup A
N✝ : Type ?u.624281
inst✝¹ : Group N✝
f✝ : G →* N✝
N : Type u_1
inst✝ : Group N
H : Subgroup G
f : N →* G
hf : Injective ↑f
h : normalizer H ≤ range f
⊢ comap f (normalizer H) = normalizer (comap f H)

tactic: rw [map_comap_eq_self h]
state_before: case a
G : Type u_2
G' : Type ?u.624266
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.624275
inst✝² : AddGroup A
N✝ : Type ?u.624281
inst✝¹ : Group N✝
f✝ : G →* N✝
N : Type u_1
inst✝ : Group N
H : Subgroup G
f : N →* G
hf : Injective ↑f
h : normalizer H ≤ range f
⊢ map f (comap f (normalizer H)) = map f (normalizer (comap f H))

tactic: apply le_antisymm
state_before: case a
G : Type u_2
G' : Type ?u.624266
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.624275
inst✝² : AddGroup A
N✝ : Type ?u.624281
inst✝¹ : Group N✝
f✝ : G →* N✝
N : Type u_1
inst✝ : Group N
H : Subgroup G
f : N →* G
hf : Injective ↑f
h : normalizer H ≤ range f
⊢ normalizer H = map f (normalizer (comap f H))

tactic: refine' le_trans (le_of_eq _) (map_mono (le_normalizer_comap _))
state_before: case a.a
G : Type u_2
G' : Type ?u.624266
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.624275
inst✝² : AddGroup A
N✝ : Type ?u.624281
inst✝¹ : Group N✝
f✝ : G →* N✝
N : Type u_1
inst✝ : Group N
H : Subgroup G
f : N →* G
hf : Injective ↑f
h : normalizer H ≤ range f
⊢ normalizer H ≤ map f (normalizer (comap f H))

tactic: rw [map_comap_eq_self h]
state_before: case a.a
G : Type u_2
G' : Type ?u.624266
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.624275
inst✝² : AddGroup A
N✝ : Type ?u.624281
inst✝¹ : Group N✝
f✝ : G →* N✝
N : Type u_1
inst✝ : Group N
H : Subgroup G
f : N →* G
hf : Injective ↑f
h : normalizer H ≤ range f
⊢ normalizer H = map f (comap f (normalizer H))

tactic: refine' le_trans (le_normalizer_map f) (le_of_eq _)
state_before: case a.a
G : Type u_2
G' : Type ?u.624266
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.624275
inst✝² : AddGroup A
N✝ : Type ?u.624281
inst✝¹ : Group N✝
f✝ : G →* N✝
N : Type u_1
inst✝ : Group N
H : Subgroup G
f : N →* G
hf : Injective ↑f
h : normalizer H ≤ range f
⊢ map f (normalizer (comap f H)) ≤ normalizer H

tactic: rw [map_comap_eq_self (le_trans le_normalizer h)]
state_before: case a.a
G : Type u_2
G' : Type ?u.624266
inst✝⁴ : Group G
inst✝³ : Group G'
A : Type ?u.624275
inst✝² : AddGroup A
N✝ : Type ?u.624281
inst✝¹ : Group N✝
f✝ : G →* N✝
N : Type u_1
inst✝ : Group N
H : Subgroup G
f : N →* G
hf : Injective ↑f
h : normalizer H ≤ range f
⊢ normalizer (map f (comap f H)) = normalizer H
Theorem: PNat.mod_add_div
File: Mathlib/Data/PNat/Basic.lean

tactic: let h₀ := Nat.mod_add_div (m : ℕ) (k : ℕ)
state_before: m k : ℕ+
⊢ ↑(mod m k) + ↑k * div m k = ↑m

tactic: have : ¬((m : ℕ) % (k : ℕ) = 0 ∧ (m : ℕ) / (k : ℕ) = 0) := by
  rintro ⟨hr, hq⟩
  rw [hr, hq, mul_zero, zero_add] at h₀
  exact (m.ne_zero h₀.symm).elim
state_before: m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
⊢ ↑(mod m k) + ↑k * div m k = ↑m

tactic: have := modDivAux_spec k ((m : ℕ) % (k : ℕ)) ((m : ℕ) / (k : ℕ)) this
state_before: m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
this : ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)
⊢ ↑(mod m k) + ↑k * div m k = ↑m

tactic: exact this.trans h₀
state_before: m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
this✝ : ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)
this : ↑(modDivAux k (↑m % ↑k) (↑m / ↑k)).fst + ↑k * (modDivAux k (↑m % ↑k) (↑m / ↑k)).snd = ↑m % ↑k + ↑k * (↑m / ↑k)
⊢ ↑(mod m k) + ↑k * div m k = ↑m

tactic: rintro ⟨hr, hq⟩
state_before: m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
⊢ ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)

tactic: rw [hr, hq, mul_zero, zero_add] at h₀
state_before: case intro
m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
hr : ↑m % ↑k = 0
hq : ↑m / ↑k = 0
⊢ False

tactic: exact (m.ne_zero h₀.symm).elim
state_before: case intro
m k : ℕ+
h₀ : 0 = ↑m
hr : ↑m % ↑k = 0
hq : ↑m / ↑k = 0
⊢ False
Theorem: MvQPF.Fix.mk_dest
File: Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean

tactic: change (Fix.mk ∘ Fix.dest) x = x
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x : Fix F α
⊢ mk (dest x) = x

tactic: apply Fix.ind_rec
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x : Fix F α
⊢ (mk ∘ dest) x = x

tactic: intro x
state_before: case h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x : Fix F α
⊢ ∀ (x : F (α ::: Fix F α)),
    (TypeVec.id ::: mk ∘ dest) <$$> x = (TypeVec.id ::: fun x => x) <$$> x → (mk ∘ dest) (mk x) = mk x

tactic: dsimp
state_before: case h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x✝ : Fix F α
x : F (α ::: Fix F α)
⊢ (TypeVec.id ::: mk ∘ dest) <$$> x = (TypeVec.id ::: fun x => x) <$$> x → (mk ∘ dest) (mk x) = mk x

tactic: rw [Fix.dest, Fix.rec_eq, ← comp_map, ← appendFun_comp, id_comp]
state_before: case h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x✝ : Fix F α
x : F (α ::: Fix F α)
⊢ (TypeVec.id ::: mk ∘ dest) <$$> x = (TypeVec.id ::: fun x => x) <$$> x → mk (dest (mk x)) = mk x

tactic: intro h
state_before: case h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x✝ : Fix F α
x : F (α ::: Fix F α)
⊢ (TypeVec.id ::: mk ∘ rec (MvFunctor.map (TypeVec.id ::: mk))) <$$> x = (TypeVec.id ::: fun x => x) <$$> x →
    mk ((TypeVec.id ::: mk ∘ rec (MvFunctor.map (TypeVec.id ::: mk))) <$$> x) = mk x

tactic: rw [h]
state_before: case h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x✝ : Fix F α
x : F (α ::: Fix F α)
h : (TypeVec.id ::: mk ∘ rec (MvFunctor.map (TypeVec.id ::: mk))) <$$> x = (TypeVec.id ::: fun x => x) <$$> x
⊢ mk ((TypeVec.id ::: mk ∘ rec (MvFunctor.map (TypeVec.id ::: mk))) <$$> x) = mk x

tactic: show Fix.mk (appendFun id id <$$> x) = Fix.mk x
state_before: case h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x✝ : Fix F α
x : F (α ::: Fix F α)
h : (TypeVec.id ::: mk ∘ rec (MvFunctor.map (TypeVec.id ::: mk))) <$$> x = (TypeVec.id ::: fun x => x) <$$> x
⊢ mk ((TypeVec.id ::: fun x => x) <$$> x) = mk x

tactic: rw [appendFun_id_id, MvFunctor.id_map]
state_before: case h
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
x✝ : Fix F α
x : F (α ::: Fix F α)
h : (TypeVec.id ::: mk ∘ rec (MvFunctor.map (TypeVec.id ::: mk))) <$$> x = (TypeVec.id ::: fun x => x) <$$> x
⊢ mk ((TypeVec.id ::: _root_.id) <$$> x) = mk x
Theorem: FractionalIdeal.eq_spanSingleton_of_principal
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: rw [spanSingleton, ← coeToSubmodule_inj, coe_mk, span_singleton_generator]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1312152
inst✝⁴ : CommRing R₁
K : Type ?u.1312158
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
I : FractionalIdeal S P
inst✝ : IsPrincipal ↑I
⊢ I = spanSingleton S (generator ↑I)
Theorem: IsLocalizedModule.iso_symm_apply_aux
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: apply_fun iso S f using LinearEquiv.injective (iso S f)
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type ?u.678047
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
m : M'
⊢ ↑(LinearEquiv.symm (iso S f)) m =
    LocalizedModule.mk (Exists.choose (_ : ∃ x, x.snd • m = ↑f x.fst)).fst
      (Exists.choose (_ : ∃ x, x.snd • m = ↑f x.fst)).snd

tactic: rw [LinearEquiv.apply_symm_apply]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type ?u.678047
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
m : M'
⊢ ↑(iso S f) (↑(LinearEquiv.symm (iso S f)) m) =
    ↑(iso S f)
      (LocalizedModule.mk (Exists.choose (_ : ∃ x, x.snd • m = ↑f x.fst)).fst
        (Exists.choose (_ : ∃ x, x.snd • m = ↑f x.fst)).snd)

tactic: simp only [iso_apply, LinearMap.toFun_eq_coe, fromLocalizedModule_mk]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type ?u.678047
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
m : M'
⊢ m =
    ↑(iso S f)
      (LocalizedModule.mk (Exists.choose (_ : ∃ x, x.snd • m = ↑f x.fst)).fst
        (Exists.choose (_ : ∃ x, x.snd • m = ↑f x.fst)).snd)

tactic: erw [Module.End_algebraMap_isUnit_inv_apply_eq_iff', (surj' _).choose_spec]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type ?u.678047
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
m : M'
⊢ m =
    fromLocalizedModule' S f
      (LocalizedModule.mk (Exists.choose (_ : ∃ x, x.snd • m = ↑f x.fst)).fst
        (Exists.choose (_ : ∃ x, x.snd • m = ↑f x.fst)).snd)
Theorem: Rat.exists_mul_self
File: Mathlib/Data/Rat/Sqrt.lean

tactic: rw [← hn, sqrt_eq, abs_mul_abs_self]
state_before: x : ℚ
x✝ : ∃ q, q * q = x
n : ℚ
hn : n * n = x
⊢ sqrt x * sqrt x = x
Theorem: mulRothNumber_singleton
File: Mathlib/Combinatorics/Additive/SalemSpencer.lean

tactic: refine' MulSalemSpencer.roth_number_eq _
state_before: F : Type ?u.135470
α : Type u_1
β : Type ?u.135476
𝕜 : Type ?u.135479
E : Type ?u.135482
inst✝³ : DecidableEq α
inst✝² : Monoid α
inst✝¹ : DecidableEq β
inst✝ : Monoid β
s t : Finset α
n : ℕ
a : α
⊢ ↑mulRothNumber {a} = 1

tactic: rw [coe_singleton]
state_before: F : Type ?u.135470
α : Type u_1
β : Type ?u.135476
𝕜 : Type ?u.135479
E : Type ?u.135482
inst✝³ : DecidableEq α
inst✝² : Monoid α
inst✝¹ : DecidableEq β
inst✝ : Monoid β
s t : Finset α
n : ℕ
a : α
⊢ MulSalemSpencer ↑{a}

tactic: exact mulSalemSpencer_singleton a
state_before: F : Type ?u.135470
α : Type u_1
β : Type ?u.135476
𝕜 : Type ?u.135479
E : Type ?u.135482
inst✝³ : DecidableEq α
inst✝² : Monoid α
inst✝¹ : DecidableEq β
inst✝ : Monoid β
s t : Finset α
n : ℕ
a : α
⊢ MulSalemSpencer {a}
Theorem: Finset.singleton_product_singleton
File: Mathlib/Data/Finset/Prod.lean

tactic: simp only [product_singleton, Function.Embedding.coeFn_mk, map_singleton]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.71755
s s' : Finset α
t t' : Finset β
a✝ : α
b✝ : β
a : α
b : β
⊢ {a} ×ˢ {b} = {(a, b)}