lean-ja / lean-ja/lean-by-example
アルファ同値を確かめる例
Open
Nobody has claimed this yet.
コード例
- Dominant language
- Lean
- Stars
- 188
- Forks
- 15
- Avg merge
- 9h 8m
- Merged PRs (30d)
- 6
Description
by_elab seems to work fine. For instance:
def name1 : ℕ → (ℕ → ℕ) → ℕ := λ n f ↦ f n
def name2 : ℕ → (ℕ → ℕ) → ℕ := λ m g ↦ g m
def getDeclExpr (n : Name) : MetaM Expr := do
let env ← getEnv
match env.find? n with
| some decl =>
match decl.value? with
| some val => return val
| none => throwError "Declaration {n} has no value (might be opaque or a constant)"
| none => throwError "Declaration {n} not found"
#guard_expr (by_elab getDeclExpr `name1) =ₐ (by_elab getDeclExpr `name2)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides Lean definitions for name1 and name2, a getDeclExpr helper, and a #guard_expr alpha-equivalence check. Start by locating the repository's existing code examples and determine where this example belongs; done means the intended alpha-equivalence example is documented or added there and can be checked successfully.
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
- 30/100