lean-ja / lean-ja/lean-by-example

axiom コマンドと CoeFun の使用例:(SKI コンビネータ計算)

Open
#485 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

メモ
Dominant language
Lean
Stars
188
Forks
15
Avg merge
9h 8m
Merged PRs (30d)
6

Description

inductive Lam : Type where
  | S : Lam
  | K : Lam
  | app : Lam → Lam → Lam

instance : CoeFun Lam (fun _ => Lam → Lam) where
  coe lambda := Lam.app lambda

namespace Lam

axiom K_def {a b : Lam} : K a b = a
axiom S_def {a b c : Lam} : S a b c = (a c) (b c)

theorem eta_simp {a b : Lam} : (∀(c : Lam), a c = b c) → a = b := by
  intro h
  specialize h S
  injection h

def I := S K K

theorem I_def {a : Lam} : I a = a := by rw [I, S_def, K_def]

example {a : Lam} : S K a = I := by
  apply eta_simp
  intro c
  rw [I_def, S_def, K_def]

end Lam

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Lean example in the issue, especially the Lam type, CoeFun instance, axioms, and SKI combinator theorems. The intended documentation location and requested change are not specified, so first clarify where this example belongs and what form the completed example should take before editing or testing it.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.