lean-ja / lean-ja/lean-by-example
Float に対するアルゴリズムの性質を証明する方法
Open
Nobody has claimed this yet.
コード例
データ型
型クラス
- Dominant language
- Lean
- Stars
- 188
- Forks
- 15
- Avg merge
- 9h 8m
- Merged PRs (30d)
- 6
Description
Float を含むような広い型クラスを定義しておいて、証明は R に対して行う。
import Mathlib
open Filter Set
-- specification over reals
def lagrangeInterpolSpec (n : ℕ) (f : ℝ → ℝ) (x : ℝ) : ℝ := sorry
-- executable program
def lagrangeInterpol {R} [Add R] [Mul R] [Zero R] [One R] (n : ℕ) (f : R → R) (x : R) : R := sorry
-- exacutable program satisfies the spec
theorem lagrangeInterpol_spec (n : ℕ) (f : ℝ → ℝ) (x : ℝ) :
lagrangeInterpol n f x = lagrangeInterpolSpec n f x := sorry
-- Lagrange interpolating polynom is actually converging to the function under some assumptions
theorem lagrangeInterpolSpec_limit (f : ℝ → ℝ) (hf : ContDiff ℝ ⊤ f) (x : ℝ) :
∀ x ∈ Icc 0 1, f x = lim ((⊤ : Filter ℕ).map (lagrangeInterpolSpec · f x)) := sorry
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
Start with the proposed lagrangeInterpol, lagrangeInterpolSpec, lagrangeInterpol_spec, and lagrangeInterpolSpec_limit declarations in the issue, then read the linked Zulip discussion about ring_nf. Done means documenting a decided, workable approach for relating the broad executable type to the real-number specification and proving the stated properties.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100