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

autoParam は暗黙引数にすることができない

Open
#1,331 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Zulipで質問すべき コード例
Dominant language
Lean
Stars
188
Forks
15
Avg merge
9h 8m
Merged PRs (30d)
6

Description

Zulip: Dependent autoParam

Wojciech Nawrocki さんの投稿より。

theorem justTheSame {a : Array Nat} {i : Nat} (il : i < a.size := by omega) (h : a[i]'il = 1) : a[i] = 1 := h

variable (A : Array Nat) (I : Fin A.size) (h : A[I] = 1)
/-
application type mismatch
  justTheSame h
argument
  h
has type
  A[I] = 1 : Prop
but is expected to have type
  autoParam (?m.683 < Array.size ?m.682) _auto✝ : Prop
-/
#check justTheSame h

#check justTheSame _ h -- works

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 by reproducing the Lean example from the issue, comparing #check justTheSame h with #check justTheSame _ h and reviewing the linked Zulip discussion. Done should establish the intended behavior of autoParam in this application and provide an agreed resolution.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.