tasksource/leandojo huggingface dataset:
Theorem: OreLocalization.zero_add
File: Mathlib/RingTheory/OreLocalization/Basic.lean

tactic: induction x using OreLocalization.ind
state_before: R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
x : OreLocalization R S
⊢ 0 + x = x

tactic: rw [← zero_div_eq_zero, add_oreDiv]
state_before: case c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r✝ : R
s✝ : { x // x ∈ S }
⊢ 0 + r✝ /ₒ s✝ = r✝ /ₒ s✝

tactic: simp
state_before: case c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r✝ : R
s✝ : { x // x ∈ S }
⊢ (0 + r✝) /ₒ s✝ = r✝ /ₒ s✝
Theorem: IntermediateField.fg_bot
File: Mathlib/FieldTheory/Adjoin.lean

tactic: simp only [Finset.coe_empty, adjoin_empty]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ adjoin F ↑∅ = ⊥
Theorem: CategoryTheory.Limits.Cotrident.condition
File: Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

tactic: rw [t.app_one, t.app_one]
state_before: J : Type w
C : Type u
inst✝ : Category C
X Y : C
f : J → (X ⟶ Y)
j₁ j₂ : J
t : Cotrident f
⊢ f j₁ ≫ π t = f j₂ ≫ π t
Theorem: Bool.xor_false_right
File: Mathlib/Data/Bool/Basic.lean

tactic: decide
state_before: ⊢ ∀ (a : Bool), xor a false = a
Theorem: dist_pi_le_iff
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: lift r to ℝ≥0 using hr
state_before: α : Type u
β : Type v
X : Type ?u.394814
ι : Type ?u.394817
inst✝² : PseudoMetricSpace α
π : β → Type u_1
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ
hr : 0 ≤ r
⊢ dist f g ≤ r ↔ ∀ (b : β), dist (f b) (g b) ≤ r

tactic: exact nndist_pi_le_iff
state_before: case intro
α : Type u
β : Type v
X : Type ?u.394814
ι : Type ?u.394817
inst✝² : PseudoMetricSpace α
π : β → Type u_1
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
⊢ dist f g ≤ ↑r ↔ ∀ (b : β), dist (f b) (g b) ≤ ↑r
Theorem: IsROrC.isCauSeq_im
File: Mathlib/Data/IsROrC/Basic.lean

tactic: simpa only [map_sub] using abs_im_le_norm (f j - f i)
state_before: K : Type u_1
E : Type ?u.7229030
inst✝ : IsROrC K
f : CauSeq K norm
ε : ℝ
ε0 : ε > 0
i : ℕ
H : ∀ (j : ℕ), j ≥ i → ‖↑f j - ↑f i‖ < ε
j : ℕ
ij : j ≥ i
⊢ abs ((fun n => ↑im (↑f n)) j - (fun n => ↑im (↑f n)) i) ≤ ‖↑f j - ↑f i‖
Theorem: MeasureTheory.addHaarMeasure_eq_volume
File: Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean

tactic: convert (addHaarMeasure_unique volume Icc01).symm
state_before: ⊢ addHaarMeasure Icc01 = volume

tactic: simp [Icc01]
state_before: case h.e'_2

⊢ addHaarMeasure Icc01 = ↑↑volume ↑Icc01 • addHaarMeasure Icc01
Theorem: Function.LeftInverse.preimage_preimage
File: Mathlib/Data/Set/Image.lean

tactic: rw [← preimage_comp, h.comp_eq_id, preimage_id]
state_before: ι : Sort ?u.108735
α : Type u_1
β : Type u_2
f : α → β
g : β → α
h : LeftInverse g f
s : Set α
⊢ f ⁻¹' (g ⁻¹' s) = s
Theorem: Polynomial.coeff_C_mul
File: Mathlib/Data/Polynomial/Coeff.lean

tactic: rcases p with ⟨p⟩
state_before: R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
⊢ coeff (↑C a * p) n = a * coeff p n

tactic: simp_rw [← monomial_zero_left, ← ofFinsupp_single, ← ofFinsupp_mul, coeff]
state_before: case ofFinsupp
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
p : AddMonoidAlgebra R ℕ
⊢ coeff (↑C a * { toFinsupp := p }) n = a * coeff { toFinsupp := p } n

tactic: exact AddMonoidAlgebra.single_zero_mul_apply p a n
state_before: case ofFinsupp
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p✝ q r : R[X]
p : AddMonoidAlgebra R ℕ
⊢ ↑(Finsupp.single 0 a * p) n = a * ↑p n
Theorem: Set.Icc_diff_Ico_same
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: rw [← Icc_diff_right, diff_diff_cancel_left (singleton_subset_iff.2 <| right_mem_Icc.2 h)]
state_before: α : Type u_1
β : Type ?u.43667
inst✝ : PartialOrder α
a b c : α
h : a ≤ b
⊢ Icc a b \ Ico a b = {b}
Theorem: ZNum.bit1_of_bit1
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [PosNum.one_sub', a.bit0_of_bit0]
state_before: α : Type ?u.676222
a : PosNum
⊢ sub' 1 (_root_.bit0 a) = ZNum.bit1 (neg a)

tactic: rfl
state_before: α : Type ?u.676222
a : PosNum
⊢ Num.toZNumNeg (pred' (PosNum.bit0 a)) = ZNum.bit1 (neg a)
Theorem: SimpleGraph.IsNClique.mono
File: Mathlib/Combinatorics/SimpleGraph/Clique.lean

tactic: simp_rw [isNClique_iff]
state_before: α : Type u_1
G H : SimpleGraph α
n : ℕ
s : Finset α
h : G ≤ H
⊢ IsNClique G n s → IsNClique H n s

tactic: exact And.imp_left (IsClique.mono h)
state_before: α : Type u_1
G H : SimpleGraph α
n : ℕ
s : Finset α
h : G ≤ H
⊢ IsClique G ↑s ∧ Finset.card s = n → IsClique H ↑s ∧ Finset.card s = n
Theorem: OrderMonoidWithZeroHom.cancel_left
File: Mathlib/Algebra/Order/Hom/Monoid.lean

tactic: rw [← comp_apply, h, comp_apply]
state_before: F : Type ?u.137405
α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.137417
inst✝⁷ : Preorder α
inst✝⁶ : Preorder β
inst✝⁵ : Preorder γ
inst✝⁴ : Preorder δ
inst✝³ : MulZeroOneClass α
inst✝² : MulZeroOneClass β
inst✝¹ : MulZeroOneClass γ
inst✝ : MulZeroOneClass δ
f g✝ : α →*₀o β
g : β →*₀o γ
f₁ f₂ : α →*₀o β
hg : Injective ↑g
h : comp g f₁ = comp g f₂
a : α
⊢ ↑g (↑f₁ a) = ↑g (↑f₂ a)
Theorem: Measurable.min
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean

tactic: simpa only [min_def] using hf.piecewise (measurableSet_le hf hg) hg
state_before: α : Type u_2
β : Type ?u.766932
γ : Type ?u.766935
γ₂ : Type ?u.766938
δ : Type u_1
ι : Sort y
s t u : Set α
inst✝¹⁷ : TopologicalSpace α
inst✝¹⁶ : MeasurableSpace α
inst✝¹⁵ : OpensMeasurableSpace α
inst✝¹⁴ : TopologicalSpace β
inst✝¹³ : MeasurableSpace β
inst✝¹² : OpensMeasurableSpace β
inst✝¹¹ : TopologicalSpace γ
inst✝¹⁰ : MeasurableSpace γ
inst✝⁹ : BorelSpace γ
inst✝⁸ : TopologicalSpace γ₂
inst✝⁷ : MeasurableSpace γ₂
inst✝⁶ : BorelSpace γ₂
inst✝⁵ : MeasurableSpace δ
α' : Type ?u.767034
inst✝⁴ : TopologicalSpace α'
inst✝³ : MeasurableSpace α'
inst✝² : LinearOrder α
inst✝¹ : OrderClosedTopology α
a b : α
inst✝ : SecondCountableTopology α
f g : δ → α
hf : Measurable f
hg : Measurable g
⊢ Measurable fun a => Min.min (f a) (g a)
Theorem: derivWithin_mem_iff
File: Mathlib/Analysis/Calculus/Deriv/Basic.lean

tactic: by_cases hx : DifferentiableWithinAt 𝕜 f t x <;>
  simp [derivWithin_zero_of_not_differentiableWithinAt, *]
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f✝ f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x✝ : 𝕜
s✝ t✝ : Set 𝕜
L L₁ L₂ : Filter 𝕜
f : 𝕜 → F
t : Set 𝕜
s : Set F
x : 𝕜
⊢ derivWithin f t x ∈ s ↔
    DifferentiableWithinAt 𝕜 f t x ∧ derivWithin f t x ∈ s ∨ ¬DifferentiableWithinAt 𝕜 f t x ∧ 0 ∈ s
Theorem: Rat.divInt_eq_div
File: Mathlib/Data/Rat/Defs.lean

tactic: by_cases d0 : d = 0
state_before: a b c : ℚ
n d : ℤ
⊢ n /. d = ↑n / ↑d

tactic: simp [division_def, coe_int_eq_divInt, mul_def' one_ne_zero d0]
state_before: case neg
a b c : ℚ
n d : ℤ
d0 : ¬d = 0
⊢ n /. d = ↑n / ↑d

tactic: simp [d0, div_zero]
state_before: case pos
a b c : ℚ
n d : ℤ
d0 : d = 0
⊢ n /. d = ↑n / ↑d
Theorem: comap_prime
File: Mathlib/Algebra/Associated.lean

tactic: simp [h]
state_before: α : Type u_1
β : Type u_3
γ : Type ?u.8780
δ : Type ?u.8783
inst✝³ : CommMonoidWithZero α
inst✝² : CommMonoidWithZero β
F : Type u_2
G : Type u_4
inst✝¹ : MonoidWithZeroHomClass F α β
inst✝ : MulHomClass G β α
f : F
g : G
p : α
hinv : ∀ (a : α), ↑g (↑f a) = a
hp : Prime (↑f p)
h : p = 0
⊢ ↑f p = 0

tactic: convert map_dvd f h
state_before: α : Type u_1
β : Type u_3
γ : Type ?u.8780
δ : Type ?u.8783
inst✝³ : CommMonoidWithZero α
inst✝² : CommMonoidWithZero β
F : Type u_2
G : Type u_4
inst✝¹ : MonoidWithZeroHomClass F α β
inst✝ : MulHomClass G β α
f : F
g : G
p : α
hinv : ∀ (a : α), ↑g (↑f a) = a
hp : Prime (↑f p)
a b : α
h : p ∣ a * b
⊢ ↑f p ∣ ↑f a * ↑f b

tactic: simp
state_before: case h.e'_4
α : Type u_1
β : Type u_3
γ : Type ?u.8780
δ : Type ?u.8783
inst✝³ : CommMonoidWithZero α
inst✝² : CommMonoidWithZero β
F : Type u_2
G : Type u_4
inst✝¹ : MonoidWithZeroHomClass F α β
inst✝ : MulHomClass G β α
f : F
g : G
p : α
hinv : ∀ (a : α), ↑g (↑f a) = a
hp : Prime (↑f p)
a b : α
h : p ∣ a * b
⊢ ↑f a * ↑f b = ↑f (a * b)

tactic: intro h
state_before: case refine'_2
α : Type u_1
β : Type u_3
γ : Type ?u.8780
δ : Type ?u.8783
inst✝³ : CommMonoidWithZero α
inst✝² : CommMonoidWithZero β
F : Type u_2
G : Type u_4
inst✝¹ : MonoidWithZeroHomClass F α β
inst✝ : MulHomClass G β α
f : F
g : G
p : α
hinv : ∀ (a : α), ↑g (↑f a) = a
hp : Prime (↑f p)
a b : α
h : p ∣ a * b
⊢ ↑f p ∣ ↑f b → p ∣ b

tactic: convert ← map_dvd g h <;> apply hinv
state_before: case refine'_2
α : Type u_1
β : Type u_3
γ : Type ?u.8780
δ : Type ?u.8783
inst✝³ : CommMonoidWithZero α
inst✝² : CommMonoidWithZero β
F : Type u_2
G : Type u_4
inst✝¹ : MonoidWithZeroHomClass F α β
inst✝ : MulHomClass G β α
f : F
g : G
p : α
hinv : ∀ (a : α), ↑g (↑f a) = a
hp : Prime (↑f p)
a b : α
h✝ : p ∣ a * b
h : ↑f p ∣ ↑f b
⊢ p ∣ b
Theorem: Finset.mulDysonEtransform.card
File: Mathlib/Combinatorics/Additive/Etransform.lean

tactic: dsimp
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CommGroup α
e : α
x : Finset α × Finset α
⊢ Finset.card (mulDysonEtransform e x).fst + Finset.card (mulDysonEtransform e x).snd =
    Finset.card x.fst + Finset.card x.snd

tactic: rw [← card_smul_finset e (_ ∩ _), smul_finset_inter, smul_inv_smul, inter_comm,
  card_union_add_card_inter, card_smul_finset]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CommGroup α
e : α
x : Finset α × Finset α
⊢ Finset.card (x.fst ∪ e • x.snd) + Finset.card (x.snd ∩ e⁻¹ • x.fst) = Finset.card x.fst + Finset.card x.snd
Theorem: LinearPMap.inverse_apply_eq
File: Mathlib/LinearAlgebra/LinearPMap.lean

tactic: have := mem_inverse_graph hf x
state_before: R : Type u_2
inst✝⁶ : Ring R
E : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_1
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.728555
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
hf : LinearMap.ker f.toFun = ⊥
y : { x // x ∈ (inverse hf).domain }
x : { x // x ∈ f.domain }
hxy : ↑f x = ↑y
⊢ ↑(inverse hf) y = ↑x

tactic: simp only [mem_graph_iff, Subtype.exists, exists_and_left, exists_eq_left] at this
state_before: R : Type u_2
inst✝⁶ : Ring R
E : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_1
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.728555
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
hf : LinearMap.ker f.toFun = ⊥
y : { x // x ∈ (inverse hf).domain }
x : { x // x ∈ f.domain }
hxy : ↑f x = ↑y
this : (↑f x, ↑x) ∈ graph (inverse hf)
⊢ ↑(inverse hf) y = ↑x

tactic: rcases this with ⟨hx, h⟩
state_before: R : Type u_2
inst✝⁶ : Ring R
E : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_1
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.728555
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
hf : LinearMap.ker f.toFun = ⊥
y : { x // x ∈ (inverse hf).domain }
x : { x // x ∈ f.domain }
hxy : ↑f x = ↑y
this : ∃ x_1, ↑(inverse hf) { val := ↑f x, property := (_ : ↑f x ∈ (inverse hf).domain) } = ↑x
⊢ ↑(inverse hf) y = ↑x

tactic: rw [← h]
state_before: case intro
R : Type u_2
inst✝⁶ : Ring R
E : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_1
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.728555
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
hf : LinearMap.ker f.toFun = ⊥
y : { x // x ∈ (inverse hf).domain }
x : { x // x ∈ f.domain }
hxy : ↑f x = ↑y
hx : ↑f x ∈ (inverse hf).domain
h : ↑(inverse hf) { val := ↑f x, property := (_ : ↑f x ∈ (inverse hf).domain) } = ↑x
⊢ ↑(inverse hf) y = ↑x

tactic: congr
state_before: case intro
R : Type u_2
inst✝⁶ : Ring R
E : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_1
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.728555
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
hf : LinearMap.ker f.toFun = ⊥
y : { x // x ∈ (inverse hf).domain }
x : { x // x ∈ f.domain }
hxy : ↑f x = ↑y
hx : ↑f x ∈ (inverse hf).domain
h : ↑(inverse hf) { val := ↑f x, property := (_ : ↑f x ∈ (inverse hf).domain) } = ↑x
⊢ ↑(inverse hf) y = ↑(inverse hf) { val := ↑f x, property := (_ : ↑f x ∈ (inverse hf).domain) }

tactic: simp only [hxy, Subtype.coe_eta]
state_before: case intro.e_a
R : Type u_2
inst✝⁶ : Ring R
E : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_1
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.728555
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
hf : LinearMap.ker f.toFun = ⊥
y : { x // x ∈ (inverse hf).domain }
x : { x // x ∈ f.domain }
hxy : ↑f x = ↑y
hx : ↑f x ∈ (inverse hf).domain
h : ↑(inverse hf) { val := ↑f x, property := (_ : ↑f x ∈ (inverse hf).domain) } = ↑x
⊢ y = { val := ↑f x, property := (_ : ↑f x ∈ (inverse hf).domain) }
Theorem: Pretrivialization.linearMapAt_symmₗ
File: Mathlib/Topology/VectorBundle/Basic.lean

tactic: rw [e.linearMapAt_def_of_mem hb]
state_before: R : Type u_4
B : Type u_1
F : Type u_2
E : B → Type u_3
inst✝⁷ : Semiring R
inst✝⁶ : TopologicalSpace F
inst✝⁵ : TopologicalSpace B
e✝ : Pretrivialization F TotalSpace.proj
x : TotalSpace E
b✝ : B
y✝ : E b✝
inst✝⁴ : AddCommMonoid F
inst✝³ : Module R F
inst✝² : (x : B) → AddCommMonoid (E x)
inst✝¹ : (x : B) → Module R (E x)
e : Pretrivialization F TotalSpace.proj
inst✝ : Pretrivialization.IsLinear R e
b : B
hb : b ∈ e.baseSet
y : F
⊢ ↑(Pretrivialization.linearMapAt R e b) (↑(Pretrivialization.symmₗ R e b) y) = y

tactic: exact (e.linearEquivAt R b hb).right_inv y
state_before: R : Type u_4
B : Type u_1
F : Type u_2
E : B → Type u_3
inst✝⁷ : Semiring R
inst✝⁶ : TopologicalSpace F
inst✝⁵ : TopologicalSpace B
e✝ : Pretrivialization F TotalSpace.proj
x : TotalSpace E
b✝ : B
y✝ : E b✝
inst✝⁴ : AddCommMonoid F
inst✝³ : Module R F
inst✝² : (x : B) → AddCommMonoid (E x)
inst✝¹ : (x : B) → Module R (E x)
e : Pretrivialization F TotalSpace.proj
inst✝ : Pretrivialization.IsLinear R e
b : B
hb : b ∈ e.baseSet
y : F
⊢ ↑↑(linearEquivAt R e b hb) (↑(Pretrivialization.symmₗ R e b) y) = y
Theorem: map_le_lineMap_iff_slope_le_slope
File: Mathlib/LinearAlgebra/AffineSpace/Ordered.lean

tactic: rw [map_le_lineMap_iff_slope_le_slope_left (mul_pos h₀ (sub_pos.2 hab)), ←
  lineMap_slope_lineMap_slope_lineMap f a b r, right_le_lineMap_iff_le h₁]
state_before: k : Type u_1
E : Type u_2
PE : Type ?u.200700
inst✝³ : LinearOrderedField k
inst✝² : OrderedAddCommGroup E
inst✝¹ : Module k E
inst✝ : OrderedSMul k E
f : k → E
a b r : k
hab : a < b
h₀ : 0 < r
h₁ : r < 1
⊢ f (↑(lineMap a b) r) ≤ ↑(lineMap (f a) (f b)) r ↔ slope f a (↑(lineMap a b) r) ≤ slope f (↑(lineMap a b) r) b
Theorem: String.utf8GetAux_of_valid
File: Std/Data/String/Lemmas.lean

tactic: match cs, cs' with
| [], [] => rfl
| [], c::cs' => simp [← hp, utf8GetAux]
| c::cs, cs' =>
  simp [utf8GetAux, -List.headD_eq_head?]; rw [if_neg]
  case hnc => rw [← hp]; apply Pos.ne_of_lt (Nat.lt_add_of_pos_right add_csize_pos)
  refine utf8GetAux_of_valid cs cs' ?_
  simpa [Nat.add_assoc, Nat.add_comm] using hp
state_before: cs cs' : List Char
i p : Nat
hp : i + utf8Len cs = p
⊢ utf8GetAux (cs ++ cs') { byteIdx := i } { byteIdx := p } = List.headD cs' default

tactic: rfl
state_before: cs cs' : List Char
i p : Nat
hp : i + utf8Len [] = p
⊢ utf8GetAux ([] ++ []) { byteIdx := i } { byteIdx := p } = List.headD [] default

tactic: simp [← hp, utf8GetAux]
state_before: cs cs'✝ : List Char
i p : Nat
c : Char
cs' : List Char
hp : i + utf8Len [] = p
⊢ utf8GetAux ([] ++ c :: cs') { byteIdx := i } { byteIdx := p } = List.headD (c :: cs') default

tactic: simp [utf8GetAux, -List.headD_eq_head?]
state_before: cs✝ cs'✝ : List Char
i p : Nat
c : Char
cs cs' : List Char
hp : i + utf8Len (c :: cs) = p
⊢ utf8GetAux (c :: cs ++ cs') { byteIdx := i } { byteIdx := p } = List.headD cs' default

tactic: rw [if_neg]
state_before: cs✝ cs'✝ : List Char
i p : Nat
c : Char
cs cs' : List Char
hp : i + utf8Len (c :: cs) = p
⊢ (if { byteIdx := i } = { byteIdx := p } then c else utf8GetAux (cs ++ cs') ({ byteIdx := i } + c) { byteIdx := p }) =
    List.headD cs' default

tactic: case hnc => rw [← hp]; apply Pos.ne_of_lt (Nat.lt_add_of_pos_right add_csize_pos)
state_before: cs✝ cs'✝ : List Char
i p : Nat
c : Char
cs cs' : List Char
hp : i + utf8Len (c :: cs) = p
⊢ utf8GetAux (cs ++ cs') ({ byteIdx := i } + c) { byteIdx := p } = List.headD cs' default

case hnc
cs✝ cs'✝ : List Char
i p : Nat
c : Char
cs cs' : List Char
hp : i + utf8Len (c :: cs) = p
⊢ ¬{ byteIdx := i } = { byteIdx := p }

tactic: refine utf8GetAux_of_valid cs cs' ?_
state_before: cs✝ cs'✝ : List Char
i p : Nat
c : Char
cs cs' : List Char
hp : i + utf8Len (c :: cs) = p
⊢ utf8GetAux (cs ++ cs') ({ byteIdx := i } + c) { byteIdx := p } = List.headD cs' default

tactic: simpa [Nat.add_assoc, Nat.add_comm] using hp
state_before: cs✝ cs'✝ : List Char
i p : Nat
c : Char
cs cs' : List Char
hp : i + utf8Len (c :: cs) = p
⊢ { byteIdx := i }.byteIdx + csize c + utf8Len cs = p

tactic: rw [← hp]
state_before: cs✝ cs'✝ : List Char
i p : Nat
c : Char
cs cs' : List Char
hp : i + utf8Len (c :: cs) = p
⊢ ¬{ byteIdx := i } = { byteIdx := p }

tactic: apply Pos.ne_of_lt (Nat.lt_add_of_pos_right add_csize_pos)
state_before: cs✝ cs'✝ : List Char
i p : Nat
c : Char
cs cs' : List Char
hp : i + utf8Len (c :: cs) = p
⊢ ¬{ byteIdx := i } = { byteIdx := i + utf8Len (c :: cs) }
Theorem: Finset.card_div_mul_le_card_mul_mul_card_mul
File: Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean

tactic: rw [← div_inv_eq_mul, ← card_inv B, ← card_inv (B * C), mul_inv, ← div_eq_mul_inv]
state_before: α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C) * card B ≤ card (A * B) * card (B * C)

tactic: exact card_div_mul_le_card_div_mul_card_div _ _ _
state_before: α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C) * card B⁻¹ ≤ card (A / B⁻¹) * card (B⁻¹ / C)
Theorem: BoxIntegral.Prepartition.mem_iUnion
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

tactic: convert Set.mem_iUnion₂
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
⊢ x ∈ Prepartition.iUnion π ↔ ∃ J, J ∈ π ∧ x ∈ J

tactic: rw [Box.mem_coe, exists_prop]
state_before: case h.e'_2.h.e'_2.h.a
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
x✝ : Box ι
⊢ x✝ ∈ π ∧ x ∈ x✝ ↔ ∃ j, x ∈ ↑x✝
Theorem: SeparationQuotient.map_prod_map_mk_nhds
File: Mathlib/Topology/Inseparable.lean

tactic: rw [nhds_prod_eq, ← prod_map_map_eq', map_mk_nhds, map_mk_nhds, nhds_prod_eq]
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.81131
α : Type ?u.81134
ι : Type ?u.81137
π : ι → Type ?u.81142
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : (i : ι) → TopologicalSpace (π i)
x✝ y✝ z : X
s : Set X
f : X → Y
t : Set (SeparationQuotient X)
x : X
y : Y
⊢ Filter.map (Prod.map mk mk) (𝓝 (x, y)) = 𝓝 (mk x, mk y)
Theorem: Set.Finite.insert
File: Mathlib/Data/Set/Finite.lean

tactic: cases hs
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
a : α
s : Set α
hs : Set.Finite s
⊢ Set.Finite (insert a s)

tactic: apply toFinite
state_before: case intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
a : α
s : Set α
a✝ : Fintype ↑s
⊢ Set.Finite (insert a s)
Theorem: map_le_lineMap_iff_slope_le_slope_left
File: Mathlib/LinearAlgebra/AffineSpace/Ordered.lean

tactic: rw [lineMap_apply, lineMap_apply, slope, slope, vsub_eq_sub, vsub_eq_sub, vsub_eq_sub,
  vadd_eq_add, vadd_eq_add, smul_eq_mul, add_sub_cancel, smul_sub, smul_sub, smul_sub,
  sub_le_iff_le_add, mul_inv_rev, mul_smul, mul_smul, ← smul_sub, ← smul_sub, ← smul_add,
  smul_smul, ← mul_inv_rev, inv_smul_le_iff h, smul_smul,
  mul_inv_cancel_right₀ (right_ne_zero_of_mul h.ne'), smul_add,
  smul_inv_smul₀ (left_ne_zero_of_mul h.ne')]
state_before: k : Type u_1
E : Type u_2
PE : Type ?u.138707
inst✝³ : LinearOrderedField k
inst✝² : OrderedAddCommGroup E
inst✝¹ : Module k E
inst✝ : OrderedSMul k E
f : k → E
a b r : k
h : 0 < r * (b - a)
⊢ f (↑(lineMap a b) r) ≤ ↑(lineMap (f a) (f b)) r ↔ slope f a (↑(lineMap a b) r) ≤ slope f a b
Theorem: Submodule.quotientPi_aux.left_inv
File: Mathlib/LinearAlgebra/QuotientPi.lean

tactic: rw [Quotient.mk''_eq_mk x']
state_before: ι : Type u_1
R : Type u_3
inst✝⁸ : CommRing R
Ms : ι → Type u_2
inst✝⁷ : (i : ι) → AddCommGroup (Ms i)
inst✝⁶ : (i : ι) → Module R (Ms i)
N : Type ?u.124946
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
Ns : ι → Type ?u.125453
inst✝³ : (i : ι) → AddCommGroup (Ns i)
inst✝² : (i : ι) → Module R (Ns i)
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
p : (i : ι) → Submodule R (Ms i)
x : ((i : ι) → Ms i) ⧸ pi Set.univ p
x' : (i : ι) → Ms i
⊢ invFun p (toFun p (Quotient.mk'' x')) = Quotient.mk'' x'

tactic: dsimp only [toFun, invFun]
state_before: ι : Type u_1
R : Type u_3
inst✝⁸ : CommRing R
Ms : ι → Type u_2
inst✝⁷ : (i : ι) → AddCommGroup (Ms i)
inst✝⁶ : (i : ι) → Module R (Ms i)
N : Type ?u.124946
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
Ns : ι → Type ?u.125453
inst✝³ : (i : ι) → AddCommGroup (Ns i)
inst✝² : (i : ι) → Module R (Ns i)
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
p : (i : ι) → Submodule R (Ms i)
x : ((i : ι) → Ms i) ⧸ pi Set.univ p
x' : (i : ι) → Ms i
⊢ invFun p (toFun p (Quotient.mk x')) = Quotient.mk x'

tactic: rw [quotientPiLift_mk p, funext fun i => (mkQ_apply (p i) (x' i)), piQuotientLift_mk p,
  lsum_single, id_apply]
state_before: ι : Type u_1
R : Type u_3
inst✝⁸ : CommRing R
Ms : ι → Type u_2
inst✝⁷ : (i : ι) → AddCommGroup (Ms i)
inst✝⁶ : (i : ι) → Module R (Ms i)
N : Type ?u.124946
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R N
Ns : ι → Type ?u.125453
inst✝³ : (i : ι) → AddCommGroup (Ns i)
inst✝² : (i : ι) → Module R (Ns i)
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
p : (i : ι) → Submodule R (Ms i)
x : ((i : ι) → Ms i) ⧸ pi Set.univ p
x' : (i : ι) → Ms i
⊢ ↑(piQuotientLift p (pi Set.univ p) single (_ : ∀ (x : ι), p x ≤ comap (single x) (pi Set.univ p)))
      (↑(quotientPiLift p (fun i => mkQ (p i)) (_ : ∀ (i : ι), p i ≤ ker (mkQ (p i)))) (Quotient.mk x')) =
    Quotient.mk x'
Theorem: AffineBasis.toMatrix_self
File: Mathlib/LinearAlgebra/AffineSpace/Matrix.lean

tactic: ext (i j)
state_before: ι : Type u₁
k : Type u₂
V : Type u₃
P : Type u₄
inst✝⁴ : AddCommGroup V
inst✝³ : AffineSpace V P
inst✝² : Ring k
inst✝¹ : Module k V
b : AffineBasis ι k P
inst✝ : DecidableEq ι
⊢ toMatrix b ↑b = 1

tactic: rw [toMatrix_apply, coord_apply, Matrix.one_eq_pi_single, Pi.single_apply]
state_before: case a.h
ι : Type u₁
k : Type u₂
V : Type u₃
P : Type u₄
inst✝⁴ : AddCommGroup V
inst✝³ : AffineSpace V P
inst✝² : Ring k
inst✝¹ : Module k V
b : AffineBasis ι k P
inst✝ : DecidableEq ι
i j : ι
⊢ toMatrix b (↑b) i j = OfNat.ofNat 1 i j
Theorem: List.join_join
File: Mathlib/Data/List/Join.lean

tactic: induction l <;> simp [*]
state_before: α : Type u_1
β : Type ?u.3806
l : List (List (List α))
⊢ join (join l) = join (map join l)
Theorem: Real.rpow_lt_rpow_of_exponent_gt
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: repeat' rw [rpow_def_of_pos hx0]
state_before: x y z : ℝ
hx0 : 0 < x
hx1 : x < 1
hyz : z < y
⊢ x ^ y < x ^ z

tactic: rw [exp_lt_exp]
state_before: x y z : ℝ
hx0 : 0 < x
hx1 : x < 1
hyz : z < y
⊢ exp (log x * y) < exp (log x * z)

tactic: exact mul_lt_mul_of_neg_left hyz (log_neg hx0 hx1)
state_before: x y z : ℝ
hx0 : 0 < x
hx1 : x < 1
hyz : z < y
⊢ log x * y < log x * z

tactic: rw [rpow_def_of_pos hx0]
state_before: x y z : ℝ
hx0 : 0 < x
hx1 : x < 1
hyz : z < y
⊢ exp (log x * y) < exp (log x * z)
Theorem: WittVector.one_coeff_eq_of_pos
File: Mathlib/RingTheory/WittVector/Defs.lean

tactic: simp only [hn, wittOne_pos_eq_zero, AlgHom.map_zero]
state_before: p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
n : ℕ
hn : 0 < n
⊢ ↑(aeval (Function.uncurry fun i => ![].coeff)) (wittOne p n) = 0
Theorem: CategoryTheory.Abelian.Exact.unop
File: Mathlib/CategoryTheory/Abelian/Exact.lean

tactic: rw [← f.op_unop, ← g.op_unop] at h
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
X Y Z : Cᵒᵖ
g : X ⟶ Y
f : Y ⟶ Z
h : Exact g f
⊢ Exact f.unop g.unop

tactic: rwa [← Exact.op_iff]
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : Abelian C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
X Y Z : Cᵒᵖ
g : X ⟶ Y
f : Y ⟶ Z
h : Exact g.unop.op f.unop.op
⊢ Exact f.unop g.unop