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

アルファ同値を確かめる例

Open
#1,892 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

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.