1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.findGreatest_spec
File: Mathlib/Data/Nat/Defs.lean

tactic: by_cases h : Nat.findGreatest P n = 0
state_before: a b c d m n✝ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
hmb : m ≤ n
hm : P m
⊢ P (findGreatest P n)
state_after: case pos
a b c d m n✝ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
hmb : m ≤ n
hm : P m
h : findGreatest P n = 0
⊢ P (findGreatest P n)

case neg
a b c d m n✝ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
hmb : m ≤ n
hm : P m
h : ¬findGreatest P n = 0
⊢ P (findGreatest P n)

tactic: cases m
state_before: case pos
a b c d m n✝ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
hmb : m ≤ n
hm : P m
h : findGreatest P n = 0
⊢ P (findGreatest P n)
state_after: case pos.zero
a b c d n✝ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : findGreatest P n = 0
hmb : 0 ≤ n
hm : P 0
⊢ P (findGreatest P n)

case pos.succ
a b c d n✝¹ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : findGreatest P n = 0
n✝ : ℕ
hmb : n✝ + 1 ≤ n
hm : P (n✝ + 1)
⊢ P (findGreatest P n)

tactic: exact ((findGreatest_eq_zero_iff.1 h) (zero_lt_succ _) hmb hm).elim
state_before: case pos.succ
a b c d n✝¹ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : findGreatest P n = 0
n✝ : ℕ
hmb : n✝ + 1 ≤ n
hm : P (n✝ + 1)
⊢ P (findGreatest P n)
state_after: no goals

tactic: rwa [h]
state_before: case pos.zero
a b c d n✝ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : findGreatest P n = 0
hmb : 0 ≤ n
hm : P 0
⊢ P (findGreatest P n)
state_after: no goals

tactic: exact (findGreatest_eq_iff.1 rfl).2.1 h
state_before: case neg
a b c d m n✝ k : ℕ
p q P Q : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
hmb : m ≤ n
hm : P m
h : ¬findGreatest P n = 0
⊢ P (findGreatest P n)
state_after: no goals
Theorem: locallyConnectedSpace_of_connected_bases
File: Mathlib/Topology/Connected/LocallyConnected.lean

tactic: rw [locallyConnectedSpace_iff_connected_basis]
state_before: α : Type u
β : Type v
ι✝ : Type u_1
π : ι✝ → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
ι : Type u_3
b : α → ι → Set α
p : α → ι → Prop
hbasis : ∀ (x : α), (𝓝 x).HasBasis (p x) (b x)
hconnected : ∀ (x : α) (i : ι), p x i → IsPreconnected (b x i)
⊢ LocallyConnectedSpace α
state_after: α : Type u
β : Type v
ι✝ : Type u_1
π : ι✝ → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
ι : Type u_3
b : α → ι → Set α
p : α → ι → Prop
hbasis : ∀ (x : α), (𝓝 x).HasBasis (p x) (b x)
hconnected : ∀ (x : α) (i : ι), p x i → IsPreconnected (b x i)
⊢ ∀ (x : α), (𝓝 x).HasBasis (fun s => s ∈ 𝓝 x ∧ IsPreconnected s) id

tactic: exact fun x =>
  (hbasis x).to_hasBasis
    (fun i hi => ⟨b x i, ⟨(hbasis x).mem_of_mem hi, hconnected x i hi⟩, subset_rfl⟩) fun s hs =>
    ⟨(hbasis x).index s hs.1, ⟨(hbasis x).property_index hs.1, (hbasis x).set_index_subset hs.1⟩⟩
state_before: α : Type u
β : Type v
ι✝ : Type u_1
π : ι✝ → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
ι : Type u_3
b : α → ι → Set α
p : α → ι → Prop
hbasis : ∀ (x : α), (𝓝 x).HasBasis (p x) (b x)
hconnected : ∀ (x : α) (i : ι), p x i → IsPreconnected (b x i)
⊢ ∀ (x : α), (𝓝 x).HasBasis (fun s => s ∈ 𝓝 x ∧ IsPreconnected s) id
state_after: no goals
Theorem: Finset.piecewise_singleton
File: Mathlib/Data/Finset/Piecewise.lean

tactic: rw [← insert_emptyc_eq, piecewise_insert, piecewise_empty]
state_before: ι : Type u_1
π : ι → Sort u_2
s : Finset ι
f g : (i : ι) → π i
inst✝¹ : (j : ι) → Decidable (j ∈ s)
inst✝ : DecidableEq ι
i : ι
⊢ {i}.piecewise f g = update g i (f i)
state_after: no goals
Theorem: CliffordAlgebra.foldl_mul
File: Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean

tactic: rw [← foldr_reverse, ← foldr_reverse, ← foldr_reverse, reverse.map_mul, foldr_mul]
state_before: R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
Q : QuadraticForm R M
f : M →ₗ[R] N →ₗ[R] N
hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x
n : N
a b : CliffordAlgebra Q
⊢ ((foldl Q f hf) n) (a * b) = ((foldl Q f hf) (((foldl Q f hf) n) a)) b
state_after: no goals
Theorem: Mathlib.Tactic.Abel.zero_term
File: Mathlib/Tactic/Abel.lean

tactic: simp [term, zero_nsmul, one_nsmul]
state_before: α : Type u_1
inst✝ : AddCommMonoid α
x a : α
⊢ term 0 x a = a
state_after: no goals
Theorem: one_le_thickenedIndicator_apply'
File: Mathlib/Topology/MetricSpace/ThickenedIndicator.lean

tactic: rw [thickenedIndicator_one_of_mem_closure δ_pos F hxF]
state_before: α : Type u_1
inst✝¹ : PseudoEMetricSpace α
X : Type u_2
inst✝ : PseudoEMetricSpace X
δ : ℝ
δ_pos : 0 < δ
F : Set X
x : X
hxF : x ∈ closure F
⊢ 1 ≤ (thickenedIndicator δ_pos F) x
state_after: no goals
Theorem: Filter.disjoint_cocompact_left
File: Mathlib/Topology/Compactness/Compact.lean

tactic: simp_rw [hasBasis_cocompact.disjoint_iff_left, compl_compl]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : Filter X
⊢ Disjoint (cocompact X) f ↔ ∃ K ∈ f, IsCompact K
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : Filter X
⊢ (∃ i, IsCompact i ∧ i ∈ f) ↔ ∃ K ∈ f, IsCompact K

tactic: tauto
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : Filter X
⊢ (∃ i, IsCompact i ∧ i ∈ f) ↔ ∃ K ∈ f, IsCompact K
state_after: no goals
Theorem: lift_rank_eq_of_equiv_equiv
File: Mathlib/LinearAlgebra/Dimension/Basic.lean

tactic: rwa [i.map_zero]
state_before: R : Type u
R' : Type u'
M M₁ : Type v
M' : Type v'
inst✝⁹ : Ring R
inst✝⁸ : Ring R'
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : Module R' M'
inst✝ : Module R' M₁
i : ZeroHom R R'
j : M ≃+ M'
hi : Bijective ⇑i
hc : ∀ (r : R) (m : M), j (r • m) = i r • j m
x✝¹ : R
x✝ : i x✝¹ = 0
⊢ i x✝¹ = i 0
state_after: no goals

tactic: erw [hc, j.apply_symm_apply]
state_before: R : Type u
R' : Type u'
M M₁ : Type v
M' : Type v'
inst✝⁹ : Ring R
inst✝⁸ : Ring R'
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : Module R' M'
inst✝ : Module R' M₁
i : ZeroHom R R'
j : M ≃+ M'
hi : Bijective ⇑i
hc : ∀ (r : R) (m : M), j (r • m) = i r • j m
x✝¹ : R
x✝ : M'
⊢ i x✝¹ • x✝ = j (x✝¹ • ↑j.symm x✝)
state_after: no goals
Theorem: Dense.denseRange_val
File: Mathlib/Topology/Basic.lean

tactic: simpa only [DenseRange, Subtype.range_coe_subtype]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f✝¹ : X → Y
s✝ : Set X
x : X
y : Y
α : Type u_4
ι : Type u_5
f✝ : α → X
g : X → Y
f : α → X
s : Set X
h : Dense s
⊢ DenseRange Subtype.val
state_after: no goals
Theorem: Vector.mapAccumr₂_bisim_tail
File: Mathlib/Data/Vector/MapLemmas.lean

tactic: rcases h with ⟨R, h₀, hR⟩
state_before: α : Type
n : ℕ
xs : Vector α n
β σ₁ γ σ₂ : Type
ys : Vector β n
f₁ : α → β → σ₁ → σ₁ × γ
f₂ : α → β → σ₂ → σ₂ × γ
s₁ : σ₁
s₂ : σ₂
h :
  ∃ R, R s₁ s₂ ∧ ∀ {s : σ₁} {q : σ₂} (a : α) (b : β), R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2
⊢ (mapAccumr₂ f₁ xs ys s₁).2 = (mapAccumr₂ f₂ xs ys s₂).2
state_after: case intro.intro
α : Type
n : ℕ
xs : Vector α n
β σ₁ γ σ₂ : Type
ys : Vector β n
f₁ : α → β → σ₁ → σ₁ × γ
f₂ : α → β → σ₂ → σ₂ × γ
s₁ : σ₁
s₂ : σ₂
R : σ₁ → σ₂ → Prop
h₀ : R s₁ s₂
hR : ∀ {s : σ₁} {q : σ₂} (a : α) (b : β), R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2
⊢ (mapAccumr₂ f₁ xs ys s₁).2 = (mapAccumr₂ f₂ xs ys s₂).2

tactic: exact (mapAccumr₂_bisim R h₀ hR).2
state_before: case intro.intro
α : Type
n : ℕ
xs : Vector α n
β σ₁ γ σ₂ : Type
ys : Vector β n
f₁ : α → β → σ₁ → σ₁ × γ
f₂ : α → β → σ₂ → σ₂ × γ
s₁ : σ₁
s₂ : σ₂
R : σ₁ → σ₂ → Prop
h₀ : R s₁ s₂
hR : ∀ {s : σ₁} {q : σ₂} (a : α) (b : β), R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2
⊢ (mapAccumr₂ f₁ xs ys s₁).2 = (mapAccumr₂ f₂ xs ys s₂).2
state_after: no goals
Theorem: PowerSeries.map_invUnitsSub
File: Mathlib/RingTheory/PowerSeries/WellKnown.lean

tactic: ext
state_before: R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : Ring S
f : R →+* S
u : Rˣ
⊢ (map f) (invUnitsSub u) = invUnitsSub ((Units.map ↑f) u)
state_after: case h
R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : Ring S
f : R →+* S
u : Rˣ
n✝ : ℕ
⊢ (coeff S n✝) ((map f) (invUnitsSub u)) = (coeff S n✝) (invUnitsSub ((Units.map ↑f) u))

tactic: simp only [← map_pow, coeff_map, coeff_invUnitsSub, one_divp]
state_before: case h
R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : Ring S
f : R →+* S
u : Rˣ
n✝ : ℕ
⊢ (coeff S n✝) ((map f) (invUnitsSub u)) = (coeff S n✝) (invUnitsSub ((Units.map ↑f) u))
state_after: case h
R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : Ring S
f : R →+* S
u : Rˣ
n✝ : ℕ
⊢ f ↑(u ^ (n✝ + 1))⁻¹ = ↑((Units.map ↑f) (u ^ (n✝ + 1)))⁻¹

tactic: rfl
state_before: case h
R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : Ring S
f : R →+* S
u : Rˣ
n✝ : ℕ
⊢ f ↑(u ^ (n✝ + 1))⁻¹ = ↑((Units.map ↑f) (u ^ (n✝ + 1)))⁻¹
state_after: no goals
Theorem: PartialEquiv.image_eq_target_inter_inv_preimage
File: Mathlib/Logic/Equiv/PartialEquiv.lean

tactic: rw [← e.image_source_inter_eq', inter_eq_self_of_subset_right h]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
s : Set α
h : s ⊆ e.source
⊢ ↑e '' s = e.target ∩ ↑e.symm ⁻¹' s
state_after: no goals
Theorem: Mathlib.Meta.NormNum.jacobiSymNat.even_odd₃
File: Mathlib/Tactic/NormNum/LegendreSymbol.lean

tactic: simp only [jacobiSymNat, ← hr, ← hc, Int.ofNat_ediv, Nat.cast_ofNat]
state_before: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 3
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ jacobiSymNat a b = -r
state_after: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 3
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ jacobiSym (↑a) b = -jacobiSym (↑a / 2) b

tactic: rw [← jacobiSym.even_odd (mod_cast ha), if_pos (by simp [hb])]
state_before: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 3
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ jacobiSym (↑a) b = -jacobiSym (↑a / 2) b
state_after: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 3
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ b % 2 = 1

tactic: rw [← Nat.mod_mod_of_dvd, hb]
state_before: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 3
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ b % 2 = 1
state_after: case h
a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 3
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ 2 ∣ 8

tactic: norm_num
state_before: case h
a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 3
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ 2 ∣ 8
state_after: no goals

tactic: simp [hb]
state_before: a b c : ℕ
r : ℤ
ha : a % 2 = 0
hb : b % 8 = 3
hc : a / 2 = c
hr : jacobiSymNat c b = r
⊢ b % 8 = 3 ∨ b % 8 = 5
state_after: no goals
Theorem: multipliable_iff_tprod_vanishing
File: Mathlib/Topology/Algebra/InfiniteSum/Group.lean

tactic: rw [multipliable_iff_cauchySeq_finset, cauchySeq_finset_iff_tprod_vanishing]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : CommGroup α
inst✝² : UniformSpace α
inst✝¹ : UniformGroup α
f g : β → α
a a₁ a₂ : α
inst✝ : CompleteSpace α
⊢ Multipliable f ↔ ∀ e ∈ 𝓝 1, ∃ s, ∀ (t : Set β), Disjoint t ↑s → ∏' (b : ↑t), f ↑b ∈ e
state_after: no goals
Theorem: PrimeMultiset.prod_dvd_iff'
File: Mathlib/Data/PNat/Factors.lean

tactic: let h := @prod_dvd_iff u n.factorMultiset
state_before: u : PrimeMultiset
n : ℕ+
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset
state_after: u : PrimeMultiset
n : ℕ+
h : u.prod ∣ n.factorMultiset.prod ↔ u ≤ n.factorMultiset := prod_dvd_iff
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset

tactic: rw [n.prod_factorMultiset] at h
state_before: u : PrimeMultiset
n : ℕ+
h : u.prod ∣ n.factorMultiset.prod ↔ u ≤ n.factorMultiset := prod_dvd_iff
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset
state_after: u : PrimeMultiset
n : ℕ+
h : u.prod ∣ n ↔ u ≤ n.factorMultiset
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset

tactic: exact h
state_before: u : PrimeMultiset
n : ℕ+
h : u.prod ∣ n ↔ u ≤ n.factorMultiset
⊢ u.prod ∣ n ↔ u ≤ n.factorMultiset
state_after: no goals
Theorem: Multiset.map_eq_singleton
File: Mathlib/Data/Multiset/Basic.lean

tactic: constructor
state_before: α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
⊢ map f s = {b} ↔ ∃ a, s = {a} ∧ f a = b
state_after: case mp
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
⊢ map f s = {b} → ∃ a, s = {a} ∧ f a = b

case mpr
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
⊢ (∃ a, s = {a} ∧ f a = b) → map f s = {b}

tactic: intro h
state_before: case mp
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
⊢ map f s = {b} → ∃ a, s = {a} ∧ f a = b
state_after: case mp
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
h : map f s = {b}
⊢ ∃ a, s = {a} ∧ f a = b

tactic: obtain ⟨a, ha⟩ : ∃ a, s = {a} := by rw [← card_eq_one, ← card_map, h, card_singleton]
state_before: case mp
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
h : map f s = {b}
⊢ ∃ a, s = {a} ∧ f a = b
state_after: case mp.intro
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
h : map f s = {b}
a : α
ha : s = {a}
⊢ ∃ a, s = {a} ∧ f a = b

tactic: refine ⟨a, ha, ?_⟩
state_before: case mp.intro
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
h : map f s = {b}
a : α
ha : s = {a}
⊢ ∃ a, s = {a} ∧ f a = b
state_after: case mp.intro
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
h : map f s = {b}
a : α
ha : s = {a}
⊢ f a = b

tactic: rw [← mem_singleton, ← h, ha, map_singleton, mem_singleton]
state_before: case mp.intro
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
h : map f s = {b}
a : α
ha : s = {a}
⊢ f a = b
state_after: no goals

tactic: rw [← card_eq_one, ← card_map, h, card_singleton]
state_before: α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
h : map f s = {b}
⊢ ∃ a, s = {a}
state_after: no goals

tactic: rintro ⟨a, rfl, rfl⟩
state_before: case mpr
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
s : Multiset α
b : β
⊢ (∃ a, s = {a} ∧ f a = b) → map f s = {b}
state_after: case mpr.intro.intro
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
a : α
⊢ map f {a} = {f a}

tactic: simp
state_before: case mpr.intro.intro
α : Type u_1
β : Type v
γ : Type u_2
f : α → β
a : α
⊢ map f {a} = {f a}
state_after: no goals
Theorem: EuclideanGeometry.inversion_dist_center
File: Mathlib/Geometry/Euclidean/Inversion/Basic.lean

tactic: rcases eq_or_ne x c with (rfl | hne)
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c✝ d x✝ y z : P
r R : ℝ
c x : P
⊢ inversion c (dist x c) x = x
state_after: case inl
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c d x✝ y z : P
r R : ℝ
x : P
⊢ inversion x (dist x x) x = x

case inr
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c✝ d x✝ y z : P
r R : ℝ
c x : P
hne : x ≠ c
⊢ inversion c (dist x c) x = x

tactic: apply inversion_self
state_before: case inl
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c d x✝ y z : P
r R : ℝ
x : P
⊢ inversion x (dist x x) x = x
state_after: no goals

tactic: rw [inversion, div_self, one_pow, one_smul, vsub_vadd]
state_before: case inr
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c✝ d x✝ y z : P
r R : ℝ
c x : P
hne : x ≠ c
⊢ inversion c (dist x c) x = x
state_after: case inr
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c✝ d x✝ y z : P
r R : ℝ
c x : P
hne : x ≠ c
⊢ dist x c ≠ 0

tactic: rwa [dist_ne_zero]
state_before: case inr
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
a b c✝ d x✝ y z : P
r R : ℝ
c x : P
hne : x ≠ c
⊢ dist x c ≠ 0
state_after: no goals
Theorem: Polynomial.not_isUnit_X_pow_sub_one
File: Mathlib/Algebra/Polynomial/Monic.lean

tactic: intro h
state_before: R✝ : Type u
S : Type v
a b : R✝
m n✝ : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
n : ℕ
⊢ ¬IsUnit (X ^ n - 1)
state_after: R✝ : Type u
S : Type v
a b : R✝
m n✝ : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
n : ℕ
h : IsUnit (X ^ n - 1)
⊢ False

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: R✝ : Type u
S : Type v
a b : R✝
m n✝ : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
n : ℕ
h : IsUnit (X ^ n - 1)
⊢ False
state_after: case inl
R✝ : Type u
S : Type v
a b : R✝
m n : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
h : IsUnit (X ^ 0 - 1)
⊢ False

case inr
R✝ : Type u
S : Type v
a b : R✝
m n✝ : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
n : ℕ
h : IsUnit (X ^ n - 1)
hn : n ≠ 0
⊢ False

tactic: apply hn
state_before: case inr
R✝ : Type u
S : Type v
a b : R✝
m n✝ : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
n : ℕ
h : IsUnit (X ^ n - 1)
hn : n ≠ 0
⊢ False
state_after: case inr
R✝ : Type u
S : Type v
a b : R✝
m n✝ : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
n : ℕ
h : IsUnit (X ^ n - 1)
hn : n ≠ 0
⊢ n = 0

tactic: rw [← @natDegree_one R, ← (monic_X_pow_sub_C _ hn).eq_one_of_isUnit h, natDegree_X_pow_sub_C]
state_before: case inr
R✝ : Type u
S : Type v
a b : R✝
m n✝ : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
n : ℕ
h : IsUnit (X ^ n - 1)
hn : n ≠ 0
⊢ n = 0
state_after: no goals

tactic: simp at h
state_before: case inl
R✝ : Type u
S : Type v
a b : R✝
m n : ℕ
ι : Type y
inst✝² : Ring R✝
p : R✝[X]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Nontrivial R
h : IsUnit (X ^ 0 - 1)
⊢ False
state_after: no goals
Theorem: measurableSet_range_inl
File: Mathlib/MeasureTheory/MeasurableSpace/Basic.lean

tactic: rw [← image_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSpace α
⊢ MeasurableSet (range Sum.inl)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSpace α
⊢ MeasurableSet (Sum.inl '' univ)

tactic: exact MeasurableSet.univ.inl_image
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
inst✝ : MeasurableSpace α
⊢ MeasurableSet (Sum.inl '' univ)
state_after: no goals
Theorem: LieModule.Weight.exists_ne_zero
File: Mathlib/Algebra/Lie/Weights/Basic.lean

tactic: simpa [LieSubmodule.eq_bot_iff] using χ.weightSpace_ne_bot
state_before: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : Weight R L M
⊢ ∃ x ∈ weightSpace M ⇑χ, x ≠ 0
state_after: no goals
Theorem: TypeVec.lastFun_toSubtype
File: Mathlib/Data/TypeVec.lean

tactic: ext i : 2
state_before: n : ℕ
α : TypeVec.{u_1} (n + 1)
p : α ⟹ repeat (n + 1) Prop
⊢ lastFun (toSubtype p) = _root_.id
state_after: case h
n : ℕ
α : TypeVec.{u_1} (n + 1)
p : α ⟹ repeat (n + 1) Prop
i : last fun i => { x // ofRepeat (p i x) }
⊢ lastFun (toSubtype p) i = _root_.id i

tactic: induction i
state_before: case h
n : ℕ
α : TypeVec.{u_1} (n + 1)
p : α ⟹ repeat (n + 1) Prop
i : last fun i => { x // ofRepeat (p i x) }
⊢ lastFun (toSubtype p) i = _root_.id i
state_after: case h.mk
n : ℕ
α : TypeVec.{u_1} (n + 1)
p : α ⟹ repeat (n + 1) Prop
val✝ : α Fin2.fz
property✝ : ofRepeat (p Fin2.fz val✝)
⊢ lastFun (toSubtype p) ⟨val✝, property✝⟩ = _root_.id ⟨val✝, property✝⟩

tactic: simp [dropFun, *]
state_before: case h.mk
n : ℕ
α : TypeVec.{u_1} (n + 1)
p : α ⟹ repeat (n + 1) Prop
val✝ : α Fin2.fz
property✝ : ofRepeat (p Fin2.fz val✝)
⊢ lastFun (toSubtype p) ⟨val✝, property✝⟩ = _root_.id ⟨val✝, property✝⟩
state_after: case h.mk
n : ℕ
α : TypeVec.{u_1} (n + 1)
p : α ⟹ repeat (n + 1) Prop
val✝ : α Fin2.fz
property✝ : ofRepeat (p Fin2.fz val✝)
⊢ lastFun (toSubtype p) ⟨val✝, property✝⟩ = ⟨val✝, property✝⟩

tactic: rfl
state_before: case h.mk
n : ℕ
α : TypeVec.{u_1} (n + 1)
p : α ⟹ repeat (n + 1) Prop
val✝ : α Fin2.fz
property✝ : ofRepeat (p Fin2.fz val✝)
⊢ lastFun (toSubtype p) ⟨val✝, property✝⟩ = ⟨val✝, property✝⟩
state_after: no goals
Theorem: Batteries.HashMap.Imp.Buckets.update_update
File: .lake/packages/batteries/Batteries/Data/HashMap/WF.lean

tactic: simp only [update, Array.uset, Array.data_length]
state_before: α : Type u_1
β : Type u_2
self : Buckets α β
i : USize
d d' : AssocList α β
h : i.toNat < self.val.size
h' : i.toNat < (self.update i d h).val.size
⊢ (self.update i d h).update i d' h' = self.update i d' h
state_after: α : Type u_1
β : Type u_2
self : Buckets α β
i : USize
d d' : AssocList α β
h : i.toNat < self.val.size
h' : i.toNat < (self.update i d h).val.size
⊢ ⟨(self.val.set ⟨i.toNat, h⟩ d).set ⟨i.toNat, h'⟩ d', ⋯⟩ = ⟨self.val.set ⟨i.toNat, h⟩ d', ⋯⟩

tactic: congr 1
state_before: α : Type u_1
β : Type u_2
self : Buckets α β
i : USize
d d' : AssocList α β
h : i.toNat < self.val.size
h' : i.toNat < (self.update i d h).val.size
⊢ ⟨(self.val.set ⟨i.toNat, h⟩ d).set ⟨i.toNat, h'⟩ d', ⋯⟩ = ⟨self.val.set ⟨i.toNat, h⟩ d', ⋯⟩
state_after: case e_val
α : Type u_1
β : Type u_2
self : Buckets α β
i : USize
d d' : AssocList α β
h : i.toNat < self.val.size
h' : i.toNat < (self.update i d h).val.size
⊢ (self.val.set ⟨i.toNat, h⟩ d).set ⟨i.toNat, h'⟩ d' = self.val.set ⟨i.toNat, h⟩ d'

tactic: rw [Array.set_set]
state_before: case e_val
α : Type u_1
β : Type u_2
self : Buckets α β
i : USize
d d' : AssocList α β
h : i.toNat < self.val.size
h' : i.toNat < (self.update i d h).val.size
⊢ (self.val.set ⟨i.toNat, h⟩ d).set ⟨i.toNat, h'⟩ d' = self.val.set ⟨i.toNat, h⟩ d'
state_after: no goals
Theorem: MvPolynomial.coe_eq_one_iff
File: Mathlib/RingTheory/MvPowerSeries/Basic.lean

tactic: rw [← coe_one, coe_inj]
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : MvPolynomial σ R
⊢ ↑φ = 1 ↔ φ = 1
state_after: no goals