All proofs
Project-declaredLean 4.33.0-rc1 · mathlib@169c26b52a38

Rice

Cslib.SKI.rice

Project documentation

Rice's theorem: no SKI term is a non-trivial predicate. More specifically, say a term P is a predicate if, for every term x, P · x reduces to either TT or FF. A predicate P is trivial if either it always reduces to true, or always to false. This version of Rice's theorem derives a contradiction from the existence of a predicate P and...

Exact Lean statement

theorem rice {P : SKI} (hP : ∀ x : SKI, ((P ⬝ x) ↠ TT) ∨ (P ⬝ x) ↠ FF)
    (hxt : ∃ x : SKI, (P ⬝ x) ↠ TT) (hxf : ∃ x : SKI, (P ⬝ x) ↠ FF) : False

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem rice {P : SKI} (hP :  x : SKI, ((P ⬝ x) ↠ TT)  (P ⬝ x) ↠ FF)    (hxt :  x : SKI, (P ⬝ x) ↠ TT) (hxf :  x : SKI, (P ⬝ x) ↠ FF) : False := by  obtain a, ha := hxt  obtain b, hb := hxf  let Neg : SKI := P ⬝' &0 ⬝' b ⬝' a |>.toSKI (n := 1)  let Abs : SKI := Neg.fixedPoint  have Neg_app :  x : SKI, (Neg ⬝ x) ↠ P ⬝ x ⬝ b ⬝ a :=    fun x => (P ⬝' &0 ⬝' b ⬝' a) |>.toSKI_correct (n := 1) [x] (by simp)  cases hP Abs  case inl h =>    have : (P ⬝ Abs) ↠ FF := calc      _ ↠ P ⬝ (NegAbs) := by apply MRed.tail; apply fixedPoint_correct      _ ↠ P ⬝ (P ⬝ Abs ⬝ b ⬝ a) := by apply MRed.tail; apply Neg_app      _ ↠ P ⬝ (TT ⬝ b ⬝ a) := by apply MRed.tail; apply MRed.head; apply MRed.head; exact h      _ ↠ P ⬝ b := by apply MRed.tail; apply TT_correct      _ ↠ FF := hb    exact TF_nequiv <| MRed.diamond h this  case inr h =>    have : (P ⬝ Abs) ↠ TT := calc      _ ↠ P ⬝ (NegAbs) := by apply MRed.tail; apply fixedPoint_correct      _ ↠ P ⬝ (P ⬝ Abs ⬝ b ⬝ a) := by apply MRed.tail; apply Neg_app      _ ↠ P ⬝ (FF ⬝ b ⬝ a) := by apply MRed.tail; apply MRed.head; apply MRed.head; exact h      _ ↠ P ⬝ a := by apply MRed.tail; apply FF_correct      _ ↠ TT := ha    exact TF_nequiv <| MRed.diamond this h
Project
Lean Computer Science Library
License
Apache-2.0
Commit
f36649cff2c9
Source
Cslib/Languages/CombinatoryLogic/Evaluation.lean:272-296

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.33.0-rc1

Unique minimal

Cslib.Automata.DA.FinAcc.unique_minimal

Plain-language statement

The minimal DFA M accepting the language l is unique up to unique isomorphism.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

Buchi Family cover

Cslib.Automata.NA.Buchi.buchiFamily_cover

Project documentation

na.buchiFamily is a cover if na has only finitely many states. This theorem uses the Ramsey theorem for infinite graphs and does not depend on any details of na.BuchiCongruence other than that it is of finite index.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record