Skip to content

Commit

Permalink
fix: computable KleeneAlgebra (Language α) instance (#3585)
Browse files Browse the repository at this point in the history
This is another case of leanprover/lean4#2096
  • Loading branch information
gebner authored and hrmacbeth committed May 10, 2023
1 parent 3b9f62e commit e2bd060
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Mathlib/Computability/Language.lean
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,9 @@ theorem one_add_kstar_mul_self_eq_kstar (l : Language α) : 1 + l∗ * l = l∗
rw [mul_self_kstar_comm, one_add_self_mul_kstar_eq_kstar]
#align language.one_add_kstar_mul_self_eq_kstar Language.one_add_kstar_mul_self_eq_kstar

-- Porting note: `noncomputable` required.
noncomputable instance : KleeneAlgebra (Language α) :=
{ Language.instSemiringLanguage, Set.instCompleteBooleanAlgebraSet,
Language.instKStarLanguage with
instance : KleeneAlgebra (Language α) :=
{ Language.instSemiringLanguage, Set.instCompleteBooleanAlgebraSet with
kstar := fun L ↦ L∗,
one_le_kstar := fun a l hl ↦ ⟨[], hl, by simp⟩,
mul_kstar_le_kstar := fun a ↦ (one_add_self_mul_kstar_eq_kstar a).le.trans' le_sup_right,
kstar_mul_le_kstar := fun a ↦ (one_add_kstar_mul_self_eq_kstar a).le.trans' le_sup_right,
Expand Down

0 comments on commit e2bd060

Please sign in to comment.