quotients-and-lifts

Define Quot.lift maps from Quot r to B with respect proofs in Lean 4.

1|Updated Nov 11, 2025
One-click install
npx skills add https://github.com/Arthur742Ramos/ComputationalPathsLean --skill quotients-and-lifts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: quotients-and-lifts
Source: https://github.com/Arthur742Ramos/ComputationalPathsLean/tree/main/.claude/skills/quotients-and-lifts
Command: npx skills add https://github.com/Arthur742Ramos/ComputationalPathsLean --skill quotients-and-lifts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps Lean developers efficiently work with Quotient types in ComputationalPaths, focusing on using Quot.lift, Quot.ind, and Quot.sound to define and manipulate quotient-based constructions, including nested lifts and common proof obligations.

Core Features & Use Cases

  • Define functions out of quotients with Quot.lift and a respect-proof hf.
  • Eliminate quotients by induction using Quot.ind to reason about quotient elements.
  • Prove equalities in quotients via Quot.sound and compatible rweq lemmas.
  • Nested lifts patterns handling quotients-of-quotients in practical proofs.
  • Use case: encode a simple relation r on a type and transport a property through Quot r to obtain a function on the quotient.

Quick Start

Define a simple quotient and use Quot.lift to build a map, then use Quot.ind to reason about an element.

Frequently Asked Questions about quotients-and-lifts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a function out of a quotient type in Lean 4?

Use Quot.lift with a representative function f : A → B and a respect proof hf showing that f preserves the equivalence relation. Quot.lift constructs a well-defined function from the quotient by ensuring equal representatives map to equal values.

What is a respect proof and why do I need it for Quot.lift?

A respect proof hf : ∀ a b, r a b → f a = f b verifies that your function f respects the quotient relation r. Without it, Quot.lift cannot guarantee the function is well-defined on equivalence classes.

How do I reason about elements inside a quotient using Quot.ind?

Quot.ind enables induction on quotient types by letting you prove properties hold for all quotient elements via their representatives. You prove the property for a representative and show it respects the underlying relation.

When should I use Quot.sound to close quotient equality goals?

Use Quot.sound when you need to prove two quotient elements are equal by showing their representatives are related by the quotient relation r. Quot.sound converts proofs of r a b into proofs that ⟦a⟧ = ⟦b⟧.

Can I nest Quot.lift for quotients-of-quotients in Lean 4?

Yes, nested Quot.lift patterns are supported in ComputationalPaths code. When lifting through multiple quotient layers, ensure each inner lift respects its relation and compose the respect proofs correctly, paying attention to relation direction and symmetry.

What common proof obligations arise when working with Lean 4 quotients?

Standard obligations include constructing respect proofs for Quot.lift, discharging equivalence properties to apply Quot.sound, and handling nested lift patterns in computational paths. ComputationalPaths encodings like LoopQuot and circle require symmetry awareness for correct relation direction.