AFTD Auto-Formalizing Theoretical Domains

Language.kstar_sub_one

theoremverifiedformalizationimported Lean

A grind regression found moving to nightly-2026-03-31 (changes from lean#13166)

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Set List in
open scoped Computability in
variable {α : Type*} {l m : Language α} in
@[scoped grind =]
theorem Language.kstar_sub_one : l∗ - 1 = (l - 1) * l∗
Formalizes
CSLib, `Language.kstar_sub_one`
Lean proof
By Ching-Tsun Chou, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2025 Ching-Tsun Chou. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Set List inopen scoped Computability invariable {α : Type*} {l m : Language α} in/-- A grind regression found moving to nightly-2026-03-31 (changes from lean#13166) -/@[scoped grind =]theorem Language.kstar_sub_one : l∗ - 1 = (l - 1) * l∗ := by  ext x; constructor  · rintro ⟨h1, h2⟩    obtain ⟨xl, rfl, h_xl⟩ := kstar_def_nonempty l ▸ h1    have h3 : ¬ xl = [] := by grind [one_def]    obtain ⟨x, xl', h_xl'⟩ := exists_cons_of_ne_nil h3    subst h_xl'    refine ⟨x, mem_preimage.mp (h_xl x ?_), xl'.flatten, join_mem_kstar ?_, ?_⟩ <;> grind  · rintro ⟨y, ⟨h_y, h_1⟩, z, h_z, rfl⟩    refine ⟨?_, ?_⟩    · apply (show l * l∗ ≤ l∗ by exact mul_kstar_le_kstar)      exact ⟨y, h_y, z, h_z, rfl⟩    · grind [one_def, append_eq_nil_iff]
See it in the graphDiscuss this resultChallenge it