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

partial_fixpoint を使える型を増やすことができる

Open
#2,549 0 comments 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

https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/partial_fixpoint_monotone.20does.20not.20add.20the.20lemma.20to.20database/with/569941985

This works

import Lean
open Lean.Order

set_option trace.Elab.Tactic.monotonicity true

def MyType : Type := sorry

def myfun : MyType → MyType := sorry

instance : PartialOrder MyType where
  rel := sorry
  rel_refl := sorry
  rel_trans := sorry
  rel_antisymm := sorry

instance : CCPO MyType where
  has_csup := sorry

@[partial_fixpoint_monotone]
theorem myfun_mono : ∀ {α} [PartialOrder α] (f : α → MyType), monotone f → monotone (fun x => myfun (f x)) := by sorry

def works' : MyType := myfun works'
partial_fixpoint

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 linked Zulip discussion and reproduce the provided Lean example, focusing on the partial_fixpoint command and the partial_fixpoint_monotone attribute. Identify why the demonstrated MyType case is limited and which additional types are intended to work; done means the supported cases are expanded and the example succeeds without changing its intended behavior.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.