← スキル一覧に戻る

quotients-and-lifts
by Arthur742Ramos
⭐ 0🍴 0📅 2026年1月18日
SKILL.md
name: quotients-and-lifts description: Work effectively with Lean 4 quotients in ComputationalPaths (Quot.lift/Quot.ind/Quot.sound), including nested lifts and common proof obligations.
Quotients & Lifts
Work with Lean 4 quotients in ComputationalPaths.
Core Operations
Define function out of quotient
def myFun : Quot r → B :=
Quot.lift
(fun x => f x) -- function on representatives
(fun a b h => ...) -- proof: r a b → f a = f b
Prove equality in quotient
Quot.sound : r a b → Quot.mk r a = Quot.mk r b
Induction on quotient
theorem my_thm (q : Quot r) : P q := by
induction q using Quot.ind with
| _ x => ... -- prove for representative
Nested Quotients
For Quot r → Quot s → C, use nested lifts:
def myFun₂ : Quot r → Quot s → C :=
Quot.lift
(fun a => Quot.lift
(fun b => f a b)
(fun b₁ b₂ h => ...))
(fun a₁ a₂ h => funext (Quot.ind (fun b => ...)))
Important Notes
- No
Quot.liftOn₂in Lean 4 - use nestedQuot.lift - Proof obligation for nested lifts often needs
funext+Quot.ind
Example (from Circle.lean)
noncomputable def encode : π₁(Circle, circleBase) → Int :=
Quot.lift
encodePath
(fun _ _ h => encodePath_respects_rweq h)
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です