1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Rel.inter_dom_subset_preimage_image
File: Mathlib/Data/Rel.lean

tactic: intro x hx
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
⊢ s ∩ r.dom ⊆ r.preimage (r.image s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s ∩ r.dom
⊢ x ∈ r.preimage (r.image s)

tactic: simp only [Set.mem_inter_iff, dom] at hx
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s ∩ r.dom
⊢ x ∈ r.preimage (r.image s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s ∧ x ∈ {x | ∃ y, r x y}
⊢ x ∈ r.preimage (r.image s)

tactic: rcases hx with ⟨hx, ⟨y, rxy⟩⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s ∧ x ∈ {x | ∃ y, r x y}
⊢ x ∈ r.preimage (r.image s)
state_after: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ x ∈ r.preimage (r.image s)

tactic: use y
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ x ∈ r.preimage (r.image s)
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ y ∈ r.image s ∧ r.inv y x

tactic: simp only [image, Set.mem_setOf_eq]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ y ∈ r.image s ∧ r.inv y x
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ (∃ x ∈ s, r x y) ∧ r.inv y x

tactic: exact ⟨⟨x, hx, rxy⟩, rxy⟩
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ (∃ x ∈ s, r x y) ∧ r.inv y x
state_after: no goals
Theorem: irreducible_pow_sup_of_le
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: by_cases hI : I = ⊥
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
T : Type u_4
inst✝¹ : CommRing T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
⊢ J ^ n ⊔ I = J ^ n
state_after: case pos
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
T : Type u_4
inst✝¹ : CommRing T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : I = ⊥
⊢ J ^ n ⊔ I = J ^ n

case neg
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
T : Type u_4
inst✝¹ : CommRing T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : ¬I = ⊥
⊢ J ^ n ⊔ I = J ^ n

tactic: rw [irreducible_pow_sup hI hJ, min_eq_right]
state_before: case neg
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
T : Type u_4
inst✝¹ : CommRing T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : ¬I = ⊥
⊢ J ^ n ⊔ I = J ^ n
state_after: case neg
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
T : Type u_4
inst✝¹ : CommRing T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : ¬I = ⊥
⊢ n ≤ count J (normalizedFactors I)

tactic: rwa [multiplicity_eq_count_normalizedFactors hJ hI, PartENat.coe_le_coe, normalize_eq J] at hn
state_before: case neg
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
T : Type u_4
inst✝¹ : CommRing T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : ¬I = ⊥
⊢ n ≤ count J (normalizedFactors I)
state_after: no goals

tactic: simp_all
state_before: case pos
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
T : Type u_4
inst✝¹ : CommRing T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : I = ⊥
⊢ J ^ n ⊔ I = J ^ n
state_after: no goals
Theorem: Set.mk_preimage_prod_left_fn_eq_if
File: Mathlib/Data/Set/Prod.lean

tactic: rw [← mk_preimage_prod_left_eq_if, prod_preimage_left, preimage_preimage]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝ : DecidablePred fun x => x ∈ t
f : γ → α
⊢ (fun a => (f a, b)) ⁻¹' s ×ˢ t = if b ∈ t then f ⁻¹' s else ∅
state_after: no goals
Theorem: Polynomial.separable_prod'
File: Mathlib/FieldTheory/Separable.lean

tactic: simp_rw [Finset.forall_mem_insert, forall_and] at h1 h2
state_before: R : Type u
inst✝ : CommRing R
ι : Type u_1
f : ι → R[X]
s✝ : Finset ι
a : ι
s : Finset ι
has : a ∉ s
ih : (∀ x ∈ s, ∀ y ∈ s, x ≠ y → IsCoprime (f x) (f y)) → (∀ x ∈ s, (f x).Separable) → (∏ x ∈ s, f x).Separable
h1 : ∀ x ∈ insert a s, ∀ y ∈ insert a s, x ≠ y → IsCoprime (f x) (f y)
h2 : ∀ x ∈ insert a s, (f x).Separable
⊢ (∏ x ∈ insert a s, f x).Separable
state_after: R : Type u
inst✝ : CommRing R
ι : Type u_1
f : ι → R[X]
s✝ : Finset ι
a : ι
s : Finset ι
has : a ∉ s
ih : (∀ x ∈ s, ∀ y ∈ s, x ≠ y → IsCoprime (f x) (f y)) → (∀ x ∈ s, (f x).Separable) → (∏ x ∈ s, f x).Separable
h2 : (f a).Separable ∧ ∀ x ∈ s, (f x).Separable
h1 :
  ((a ≠ a → IsCoprime (f a) (f a)) ∧ ∀ x ∈ s, a ≠ x → IsCoprime (f a) (f x)) ∧
    (∀ x ∈ s, x ≠ a → IsCoprime (f x) (f a)) ∧ ∀ x ∈ s, ∀ x_2 ∈ s, x ≠ x_2 → IsCoprime (f x) (f x_2)
⊢ (∏ x ∈ insert a s, f x).Separable

tactic: rw [prod_insert has]
state_before: R : Type u
inst✝ : CommRing R
ι : Type u_1
f : ι → R[X]
s✝ : Finset ι
a : ι
s : Finset ι
has : a ∉ s
ih : (∀ x ∈ s, ∀ y ∈ s, x ≠ y → IsCoprime (f x) (f y)) → (∀ x ∈ s, (f x).Separable) → (∏ x ∈ s, f x).Separable
h2 : (f a).Separable ∧ ∀ x ∈ s, (f x).Separable
h1 :
  ((a ≠ a → IsCoprime (f a) (f a)) ∧ ∀ x ∈ s, a ≠ x → IsCoprime (f a) (f x)) ∧
    (∀ x ∈ s, x ≠ a → IsCoprime (f x) (f a)) ∧ ∀ x ∈ s, ∀ x_2 ∈ s, x ≠ x_2 → IsCoprime (f x) (f x_2)
⊢ (∏ x ∈ insert a s, f x).Separable
state_after: R : Type u
inst✝ : CommRing R
ι : Type u_1
f : ι → R[X]
s✝ : Finset ι
a : ι
s : Finset ι
has : a ∉ s
ih : (∀ x ∈ s, ∀ y ∈ s, x ≠ y → IsCoprime (f x) (f y)) → (∀ x ∈ s, (f x).Separable) → (∏ x ∈ s, f x).Separable
h2 : (f a).Separable ∧ ∀ x ∈ s, (f x).Separable
h1 :
  ((a ≠ a → IsCoprime (f a) (f a)) ∧ ∀ x ∈ s, a ≠ x → IsCoprime (f a) (f x)) ∧
    (∀ x ∈ s, x ≠ a → IsCoprime (f x) (f a)) ∧ ∀ x ∈ s, ∀ x_2 ∈ s, x ≠ x_2 → IsCoprime (f x) (f x_2)
⊢ (f a * ∏ x ∈ s, f x).Separable

tactic: exact
  h2.1.mul (ih h1.2.2 h2.2)
    (IsCoprime.prod_right fun i his => h1.1.2 i his <| Ne.symm <| ne_of_mem_of_not_mem his has)
state_before: R : Type u
inst✝ : CommRing R
ι : Type u_1
f : ι → R[X]
s✝ : Finset ι
a : ι
s : Finset ι
has : a ∉ s
ih : (∀ x ∈ s, ∀ y ∈ s, x ≠ y → IsCoprime (f x) (f y)) → (∀ x ∈ s, (f x).Separable) → (∏ x ∈ s, f x).Separable
h2 : (f a).Separable ∧ ∀ x ∈ s, (f x).Separable
h1 :
  ((a ≠ a → IsCoprime (f a) (f a)) ∧ ∀ x ∈ s, a ≠ x → IsCoprime (f a) (f x)) ∧
    (∀ x ∈ s, x ≠ a → IsCoprime (f x) (f a)) ∧ ∀ x ∈ s, ∀ x_2 ∈ s, x ≠ x_2 → IsCoprime (f x) (f x_2)
⊢ (f a * ∏ x ∈ s, f x).Separable
state_after: no goals
Theorem: WeierstrassCurve.Projective.polynomialY_eq
File: Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean

tactic: rw [polynomialY, polynomial]
state_before: R : Type u
inst✝ : CommRing R
W : Projective R
⊢ W.polynomialY = C 2 * X 1 * X 2 + C W.a₁ * X 0 * X 2 + C W.a₃ * X 2 ^ 2
state_after: R : Type u
inst✝ : CommRing R
W : Projective R
⊢ (pderiv 1)
      (X 1 ^ 2 * X 2 + C W.a₁ * X 0 * X 1 * X 2 + C W.a₃ * X 1 * X 2 ^ 2 -
        (X 0 ^ 3 + C W.a₂ * X 0 ^ 2 * X 2 + C W.a₄ * X 0 * X 2 ^ 2 + C W.a₆ * X 2 ^ 3)) =
    C 2 * X 1 * X 2 + C W.a₁ * X 0 * X 2 + C W.a₃ * X 2 ^ 2

tactic: pderiv_simp
state_before: R : Type u
inst✝ : CommRing R
W : Projective R
⊢ (pderiv 1)
      (X 1 ^ 2 * X 2 + C W.a₁ * X 0 * X 1 * X 2 + C W.a₃ * X 1 * X 2 ^ 2 -
        (X 0 ^ 3 + C W.a₂ * X 0 ^ 2 * X 2 + C W.a₄ * X 0 * X 2 ^ 2 + C W.a₆ * X 2 ^ 3)) =
    C 2 * X 1 * X 2 + C W.a₁ * X 0 * X 2 + C W.a₃ * X 2 ^ 2
state_after: R : Type u
inst✝ : CommRing R
W : Projective R
⊢ ↑2 * X 1 ^ (2 - 1) * 1 * X 2 + X 1 ^ 2 * 0 +
          (((0 * X 0 + C W.a₁ * 0) * X 1 + C W.a₁ * X 0 * 1) * X 2 + C W.a₁ * X 0 * X 1 * 0) +
        ((0 * X 1 + C W.a₃ * 1) * X 2 ^ 2 + C W.a₃ * X 1 * (↑2 * X 2 ^ (2 - 1) * 0)) -
      (↑3 * X 0 ^ (3 - 1) * 0 + ((0 * X 0 ^ 2 + C W.a₂ * (↑2 * X 0 ^ (2 - 1) * 0)) * X 2 + C W.a₂ * X 0 ^ 2 * 0) +
          ((0 * X 0 + C W.a₄ * 0) * X 2 ^ 2 + C W.a₄ * X 0 * (↑2 * X 2 ^ (2 - 1) * 0)) +
        (0 * X 2 ^ 3 + C W.a₆ * (↑3 * X 2 ^ (3 - 1) * 0))) =
    2 * X 1 * X 2 + C W.a₁ * X 0 * X 2 + C W.a₃ * X 2 ^ 2

tactic: ring1
state_before: R : Type u
inst✝ : CommRing R
W : Projective R
⊢ ↑2 * X 1 ^ (2 - 1) * 1 * X 2 + X 1 ^ 2 * 0 +
          (((0 * X 0 + C W.a₁ * 0) * X 1 + C W.a₁ * X 0 * 1) * X 2 + C W.a₁ * X 0 * X 1 * 0) +
        ((0 * X 1 + C W.a₃ * 1) * X 2 ^ 2 + C W.a₃ * X 1 * (↑2 * X 2 ^ (2 - 1) * 0)) -
      (↑3 * X 0 ^ (3 - 1) * 0 + ((0 * X 0 ^ 2 + C W.a₂ * (↑2 * X 0 ^ (2 - 1) * 0)) * X 2 + C W.a₂ * X 0 ^ 2 * 0) +
          ((0 * X 0 + C W.a₄ * 0) * X 2 ^ 2 + C W.a₄ * X 0 * (↑2 * X 2 ^ (2 - 1) * 0)) +
        (0 * X 2 ^ 3 + C W.a₆ * (↑3 * X 2 ^ (3 - 1) * 0))) =
    2 * X 1 * X 2 + C W.a₁ * X 0 * X 2 + C W.a₃ * X 2 ^ 2
state_after: no goals
Theorem: List.asString_eq
File: Mathlib/Data/String/Basic.lean

tactic: rw [← asString_toList s, asString_inj, asString_toList s]
state_before: l : List Char
s : String
⊢ l.asString = s ↔ l = s.toList
state_after: no goals
Theorem: Set.disjoint_univ_pi
File: Mathlib/Data/Set/Prod.lean

tactic: simp only [disjoint_iff_inter_eq_empty, ← pi_inter_distrib, univ_pi_eq_empty_iff]
state_before: ι : Type u_1
α : ι → Type u_2
β : ι → Type u_3
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i : ι
⊢ Disjoint (univ.pi t₁) (univ.pi t₂) ↔ ∃ i, Disjoint (t₁ i) (t₂ i)
state_after: no goals
Theorem: AlgebraicGeometry.RingedSpace.mem_top_basicOpen
File: Mathlib/Geometry/RingedSpace/Basic.lean

tactic: trivial
state_before: X : RingedSpace
f : ↑(X.presheaf.obj { unop := ⊤ })
x : ↑↑X.toPresheafedSpace
⊢ x ∈ ⊤
state_after: no goals
Theorem: List.sym_one_eq
File: Mathlib/Data/List/Sym.lean

tactic: induction xs with
| nil => simp only [List.sym, Nat.succ_eq_add_one, Nat.reduceAdd, map_nil]
| cons x xs ih =>
  rw [map_cons, ← ih, List.sym, List.sym, map_singleton, singleton_append]
state_before: α : Type u_1
xs ys : List α
n : ℕ
⊢ List.sym 1 xs = map (fun x => x ::ₛ Sym.nil) xs
state_after: no goals

tactic: simp only [List.sym, Nat.succ_eq_add_one, Nat.reduceAdd, map_nil]
state_before: case nil
α : Type u_1
xs ys : List α
n : ℕ
⊢ List.sym 1 [] = map (fun x => x ::ₛ Sym.nil) []
state_after: no goals

tactic: rw [map_cons, ← ih, List.sym, List.sym, map_singleton, singleton_append]
state_before: case cons
α : Type u_1
xs✝ ys : List α
n : ℕ
x : α
xs : List α
ih : List.sym 1 xs = map (fun x => x ::ₛ Sym.nil) xs
⊢ List.sym 1 (x :: xs) = map (fun x => x ::ₛ Sym.nil) (x :: xs)
state_after: no goals
Theorem: DoubleQuot.quotQuotEquivComm_symm
File: Mathlib/RingTheory/Ideal/QuotientOperations.lean

tactic: change (((quotQuotEquivQuotSup I J).trans (quotEquivOfEq (sup_comm ..))).trans
  (quotQuotEquivQuotSup J I).symm).symm =
    ((quotQuotEquivQuotSup J I).trans (quotEquivOfEq (sup_comm ..))).trans
      (quotQuotEquivQuotSup I J).symm
state_before: R : Type u
inst✝ : CommRing R
I J : Ideal R
⊢ (quotQuotEquivComm I J).symm = quotQuotEquivComm J I
state_after: R : Type u
inst✝ : CommRing R
I J : Ideal R
⊢ (((quotQuotEquivQuotSup I J).trans (quotEquivOfEq ⋯)).trans (quotQuotEquivQuotSup J I).symm).symm =
    ((quotQuotEquivQuotSup J I).trans (quotEquivOfEq ⋯)).trans (quotQuotEquivQuotSup I J).symm

tactic: ext r
state_before: R : Type u
inst✝ : CommRing R
I J : Ideal R
⊢ (((quotQuotEquivQuotSup I J).trans (quotEquivOfEq ⋯)).trans (quotQuotEquivQuotSup J I).symm).symm =
    ((quotQuotEquivQuotSup J I).trans (quotEquivOfEq ⋯)).trans (quotQuotEquivQuotSup I J).symm
state_after: case h
R : Type u
inst✝ : CommRing R
I J : Ideal R
r : (R ⧸ J) ⧸ map (Ideal.Quotient.mk J) I
⊢ (((quotQuotEquivQuotSup I J).trans (quotEquivOfEq ⋯)).trans (quotQuotEquivQuotSup J I).symm).symm r =
    (((quotQuotEquivQuotSup J I).trans (quotEquivOfEq ⋯)).trans (quotQuotEquivQuotSup I J).symm) r

tactic: dsimp
state_before: case h
R : Type u
inst✝ : CommRing R
I J : Ideal R
r : (R ⧸ J) ⧸ map (Ideal.Quotient.mk J) I
⊢ (((quotQuotEquivQuotSup I J).trans (quotEquivOfEq ⋯)).trans (quotQuotEquivQuotSup J I).symm).symm r =
    (((quotQuotEquivQuotSup J I).trans (quotEquivOfEq ⋯)).trans (quotQuotEquivQuotSup I J).symm) r
state_after: case h
R : Type u
inst✝ : CommRing R
I J : Ideal R
r : (R ⧸ J) ⧸ map (Ideal.Quotient.mk J) I
⊢ (quotQuotEquivQuotSup I J).symm ((quotEquivOfEq ⋯).symm ((quotQuotEquivQuotSup J I).symm.symm r)) =
    (quotQuotEquivQuotSup I J).symm ((quotEquivOfEq ⋯) ((quotQuotEquivQuotSup J I) r))

tactic: rfl
state_before: case h
R : Type u
inst✝ : CommRing R
I J : Ideal R
r : (R ⧸ J) ⧸ map (Ideal.Quotient.mk J) I
⊢ (quotQuotEquivQuotSup I J).symm ((quotEquivOfEq ⋯).symm ((quotQuotEquivQuotSup J I).symm.symm r)) =
    (quotQuotEquivQuotSup I J).symm ((quotEquivOfEq ⋯) ((quotQuotEquivQuotSup J I) r))
state_after: no goals
Theorem: Nat.mul_eq_left
File: Mathlib/Data/Nat/Defs.lean

tactic: simpa using Nat.mul_right_inj ha (c := 1)
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
ha : a ≠ 0
⊢ a * b = a ↔ b = 1
state_after: no goals
Theorem: geom_sum_mul_neg
File: Mathlib/Algebra/GeomSum.lean

tactic: have := congr_arg Neg.neg (geom_sum_mul x n)
state_before: α : Type u
inst✝ : Ring α
x : α
n : ℕ
⊢ (∑ i ∈ range n, x ^ i) * (1 - x) = 1 - x ^ n
state_after: α : Type u
inst✝ : Ring α
x : α
n : ℕ
this : -((∑ i ∈ range n, x ^ i) * (x - 1)) = -(x ^ n - 1)
⊢ (∑ i ∈ range n, x ^ i) * (1 - x) = 1 - x ^ n

tactic: rw [neg_sub, ← mul_neg, neg_sub] at this
state_before: α : Type u
inst✝ : Ring α
x : α
n : ℕ
this : -((∑ i ∈ range n, x ^ i) * (x - 1)) = -(x ^ n - 1)
⊢ (∑ i ∈ range n, x ^ i) * (1 - x) = 1 - x ^ n
state_after: α : Type u
inst✝ : Ring α
x : α
n : ℕ
this : (∑ i ∈ range n, x ^ i) * (1 - x) = 1 - x ^ n
⊢ (∑ i ∈ range n, x ^ i) * (1 - x) = 1 - x ^ n

tactic: exact this
state_before: α : Type u
inst✝ : Ring α
x : α
n : ℕ
this : (∑ i ∈ range n, x ^ i) * (1 - x) = 1 - x ^ n
⊢ (∑ i ∈ range n, x ^ i) * (1 - x) = 1 - x ^ n
state_after: no goals
Theorem: CategoryTheory.ShortComplex.exact_iff_surjective_abToCycles
File: Mathlib/Algebra/Homology/ShortComplex/Ab.lean

tactic: rw [S.abLeftHomologyData.exact_iff_epi_f', abLeftHomologyData_f',
  AddCommGrp.epi_iff_surjective]
state_before: S : ShortComplex Ab
⊢ S.Exact ↔ Function.Surjective ⇑S.abToCycles
state_after: S : ShortComplex Ab
⊢ Function.Surjective ⇑S.abToCycles ↔ Function.Surjective ⇑S.abToCycles

tactic: rfl
state_before: S : ShortComplex Ab
⊢ Function.Surjective ⇑S.abToCycles ↔ Function.Surjective ⇑S.abToCycles
state_after: no goals
Theorem: MeasureTheory.FiniteMeasure.self_eq_mass_smul_normalize
File: Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean

tactic: apply eq_of_forall_apply_eq
state_before: Ω : Type u_1
inst✝ : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
⊢ μ = μ.mass • μ.normalize.toFiniteMeasure
state_after: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
⊢ ∀ (s : Set Ω), MeasurableSet s → μ s = (μ.mass • μ.normalize.toFiniteMeasure) s

tactic: intro s _s_mble
state_before: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
⊢ ∀ (s : Set Ω), MeasurableSet s → μ s = (μ.mass • μ.normalize.toFiniteMeasure) s
state_after: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
s : Set Ω
_s_mble : MeasurableSet s
⊢ μ s = (μ.mass • μ.normalize.toFiniteMeasure) s

tactic: rw [μ.self_eq_mass_mul_normalize s, smul_apply, smul_eq_mul,
  ProbabilityMeasure.coeFn_comp_toFiniteMeasure_eq_coeFn]
state_before: case h
Ω : Type u_1
inst✝ : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
s : Set Ω
_s_mble : MeasurableSet s
⊢ μ s = (μ.mass • μ.normalize.toFiniteMeasure) s
state_after: no goals
Theorem: Matroid.restrict_restrict_eq
File: Mathlib/Data/Matroid/Restrict.lean

tactic: refine eq_of_indep_iff_indep_forall rfl ?_
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y R₁ R₂ : Set α
M : Matroid α
hR : R₂ ⊆ R₁
⊢ M ↾ R₁ ↾ R₂ = M ↾ R₂
state_after: α : Type u_1
M✝ : Matroid α
R I J X Y R₁ R₂ : Set α
M : Matroid α
hR : R₂ ⊆ R₁
⊢ ∀ I ⊆ (M ↾ R₁ ↾ R₂).E, (M ↾ R₁ ↾ R₂).Indep I ↔ (M ↾ R₂).Indep I

tactic: simp only [restrict_ground_eq, restrict_indep_iff, and_congr_left_iff, and_iff_left_iff_imp]
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y R₁ R₂ : Set α
M : Matroid α
hR : R₂ ⊆ R₁
⊢ ∀ I ⊆ (M ↾ R₁ ↾ R₂).E, (M ↾ R₁ ↾ R₂).Indep I ↔ (M ↾ R₂).Indep I
state_after: α : Type u_1
M✝ : Matroid α
R I J X Y R₁ R₂ : Set α
M : Matroid α
hR : R₂ ⊆ R₁
⊢ ∀ I ⊆ R₂, I ⊆ R₂ → M.Indep I → I ⊆ R₁

tactic: exact fun _ h _ _ ↦ h.trans hR
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y R₁ R₂ : Set α
M : Matroid α
hR : R₂ ⊆ R₁
⊢ ∀ I ⊆ R₂, I ⊆ R₂ → M.Indep I → I ⊆ R₁
state_after: no goals
Theorem: Finset.le_sup_iff
File: Mathlib/Data/Finset/Lattice.lean

tactic: apply Iff.intro
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
⊢ a ≤ s.sup f ↔ ∃ b ∈ s, a ≤ f b
state_after: case mp
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
⊢ a ≤ s.sup f → ∃ b ∈ s, a ≤ f b

case mpr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
⊢ (∃ b ∈ s, a ≤ f b) → a ≤ s.sup f

tactic: rw [sup_cons, le_sup_iff]
state_before: case mp.cons
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
c : ι
t : Finset ι
hc : c ∉ t
ih : a ≤ t.sup f → ∃ b ∈ t, a ≤ f b
⊢ a ≤ (cons c t hc).sup f → ∃ b ∈ cons c t hc, a ≤ f b
state_after: case mp.cons
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
c : ι
t : Finset ι
hc : c ∉ t
ih : a ≤ t.sup f → ∃ b ∈ t, a ≤ f b
⊢ a ≤ f c ∨ a ≤ t.sup f → ∃ b ∈ cons c t hc, a ≤ f b

tactic: exact fun
| Or.inl h => ⟨c, mem_cons.2 (Or.inl rfl), h⟩
| Or.inr h => let ⟨b, hb, hle⟩ := ih h; ⟨b, mem_cons.2 (Or.inr hb), hle⟩
state_before: case mp.cons
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
c : ι
t : Finset ι
hc : c ∉ t
ih : a ≤ t.sup f → ∃ b ∈ t, a ≤ f b
⊢ a ≤ f c ∨ a ≤ t.sup f → ∃ b ∈ cons c t hc, a ≤ f b
state_after: no goals

tactic: exact fun ⟨b, hb, hle⟩ => le_trans hle (le_sup hb)
state_before: case mpr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
⊢ (∃ b ∈ s, a ≤ f b) → a ≤ s.sup f
state_after: no goals
Theorem: Finset.sup'_eq_csSup_image
File: Mathlib/Order/ConditionallyCompleteLattice/Finset.lean

tactic: simp [csSup_le_iff (s.finite_toSet.image f).bddAbove (H.to_set.image f)]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : ConditionallyCompleteLattice α
s : Finset ι
H : s.Nonempty
f : ι → α
a : α
⊢ s.sup' H f ≤ a ↔ sSup (f '' ↑s) ≤ a
state_after: no goals
Theorem: GeneralizedContinuedFraction.of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_none
File: Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean

tactic: rw [of_terminatedAt_iff_intFractPair_seq1_terminatedAt, Stream'.Seq.TerminatedAt,
  IntFractPair.get?_seq1_eq_succ_get?_stream]
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
⊢ (of v).TerminatedAt n ↔ IntFractPair.stream v (n + 1) = none
state_after: no goals
Theorem: Mathlib.Meta.Positivity.nonneg_of_isNat
File: Mathlib/Tactic/Positivity/Core.lean

tactic: rw [NormNum.IsNat.to_eq h rfl]
state_before: u : Level
α : Q(Type u)
zα : Q(Zero «$α»)
pα : Q(PartialOrder «$α»)
A : Type u_1
e : A
n : ℕ
inst✝ : OrderedSemiring A
h : NormNum.IsNat e n
⊢ 0 ≤ e
state_after: u : Level
α : Q(Type u)
zα : Q(Zero «$α»)
pα : Q(PartialOrder «$α»)
A : Type u_1
e : A
n : ℕ
inst✝ : OrderedSemiring A
h : NormNum.IsNat e n
⊢ 0 ≤ ↑n

tactic: exact Nat.cast_nonneg n
state_before: u : Level
α : Q(Type u)
zα : Q(Zero «$α»)
pα : Q(PartialOrder «$α»)
A : Type u_1
e : A
n : ℕ
inst✝ : OrderedSemiring A
h : NormNum.IsNat e n
⊢ 0 ≤ ↑n
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.range_map
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: simp only [coe_range, coe_map, Finset.coe_image, range_comp]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : MeasurableSpace α
inst✝ : DecidableEq γ
g : β → γ
f : α →ₛ β
⊢ ↑(map g f).range = ↑(Finset.image g f.range)
state_after: no goals
Theorem: Set.Finite.lowerClosure
File: Mathlib/Order/UpperLower/LocallyFinite.lean

tactic: rw [coe_lowerClosure]
state_before: α : Type u_1
inst✝¹ : Preorder α
s : Set α
inst✝ : LocallyFiniteOrderBot α
hs : s.Finite
⊢ (↑(lowerClosure s)).Finite
state_after: α : Type u_1
inst✝¹ : Preorder α
s : Set α
inst✝ : LocallyFiniteOrderBot α
hs : s.Finite
⊢ (⋃ a ∈ s, Iic a).Finite

tactic: exact hs.biUnion fun _ _ => finite_Iic _
state_before: α : Type u_1
inst✝¹ : Preorder α
s : Set α
inst✝ : LocallyFiniteOrderBot α
hs : s.Finite
⊢ (⋃ a ∈ s, Iic a).Finite
state_after: no goals
Theorem: Set.uIcc_of_ge
File: Mathlib/Order/Interval/Set/UnorderedInterval.lean

tactic: rw [uIcc, inf_eq_right.2 h, sup_eq_left.2 h]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Lattice α
inst✝ : Lattice β
a a₁ a₂ b b₁ b₂ c x : α
h : b ≤ a
⊢ [[a, b]] = Icc b a
state_after: no goals
Theorem: SetTheory.PGame.relabel_moveLeft
File: Mathlib/SetTheory/Game/PGame.lean

tactic: simp
state_before: xl xr : Type u
x : PGame
xl' xr' : Type u_1
el : xl' ≃ x.LeftMoves
er : xr' ≃ x.RightMoves
i : x.LeftMoves
⊢ (relabel el er).moveLeft (el.symm i) = x.moveLeft i
state_after: no goals
Theorem: Equiv.Set.sumDiffSubset_symm_apply_of_not_mem
File: Mathlib/Logic/Equiv/Set.lean

tactic: apply (Equiv.Set.sumDiffSubset h).injective
state_before: α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u_1
s t : Set α
h : s ⊆ t
inst✝ : DecidablePred fun x => x ∈ s
x : ↑t
hx : ↑x ∉ s
⊢ (Set.sumDiffSubset h).symm x = Sum.inr ⟨↑x, ⋯⟩
state_after: case a
α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u_1
s t : Set α
h : s ⊆ t
inst✝ : DecidablePred fun x => x ∈ s
x : ↑t
hx : ↑x ∉ s
⊢ (Set.sumDiffSubset h) ((Set.sumDiffSubset h).symm x) = (Set.sumDiffSubset h) (Sum.inr ⟨↑x, ⋯⟩)

tactic: simp only [apply_symm_apply, sumDiffSubset_apply_inr]
state_before: case a
α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u_1
s t : Set α
h : s ⊆ t
inst✝ : DecidablePred fun x => x ∈ s
x : ↑t
hx : ↑x ∉ s
⊢ (Set.sumDiffSubset h) ((Set.sumDiffSubset h).symm x) = (Set.sumDiffSubset h) (Sum.inr ⟨↑x, ⋯⟩)
state_after: case a
α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u_1
s t : Set α
h : s ⊆ t
inst✝ : DecidablePred fun x => x ∈ s
x : ↑t
hx : ↑x ∉ s
⊢ x = inclusion ⋯ ⟨↑x, ⋯⟩

tactic: exact Subtype.eq rfl
state_before: case a
α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u_1
s t : Set α
h : s ⊆ t
inst✝ : DecidablePred fun x => x ∈ s
x : ↑t
hx : ↑x ∉ s
⊢ x = inclusion ⋯ ⟨↑x, ⋯⟩
state_after: no goals
Theorem: Real.cos_two_mul
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [cos_two_mul]
state_before: x y : ℝ
⊢ ↑(cos (2 * x)) = ↑(2 * cos x ^ 2 - 1)
state_after: no goals