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

axiom α ≃ β → α = β と ofReduceBool は矛盾する

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

import Mathlib.Data.Setoid.Basic

axiom equiv_of_eq {α β : Type} (f : α ≃ β) : α = β

def Nat' := Quotient (Setoid.ker fun x : Nat ↦ x - 1)
@[simp] theorem mk_zero : (⟦0⟧ : Nat') = ⟦1⟧ := Quotient.sound rfl

def equivNat : Nat' ≃ Nat where
  toFun x := x.lift _ fun _ _ ↦ id
  invFun x := ⟦x + 1⟧
  left_inv x := x.inductionOn fun x ↦ x.recOn (by simp) (by simp)
  right_inv x := by simp

def castNat : Nat' → Nat := cast (equiv_of_eq equivNat)

theorem contradiction : False := by
  have : castNat ⟦0⟧ ≠ castNat ⟦1⟧ := by native_decide
  simpa

-- 'contradiction' depends on axioms: [equiv_of_eq, propext, Lean.ofReduceBool, Quot.sound]
#print axioms contradiction

#general > Cardinality model incompatible with Lean compiler

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

Reproduce the self-contained Lean snippet and inspect the axioms printed for contradiction. Then read the linked Zulip discussion about the cardinality model and compiler compatibility; the issue is complete only when the incompatibility is explained and an agreed resolution is documented.

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.