rweq-proofs

Construct RwEq proofs in ComputationalPaths using transitivity, congruence, and canonical lemmas.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

RwEq proofs are central to high-level equality reasoning in ComputationalPaths. This Skill provides a library of essential lemmas and strategies to compose rewrite-equivalence proofs using transitivity, congruence, and canonical simplifications.

Core Features & Use Cases

  • Equivalence properties: rweq_refl, rweq_symm, rweq_trans
  • Unit laws: rweq_cmpA_refl_left, rweq_cmpA_refl_right
  • Inverse laws: rweq_cmpA_inv_left, rweq_cmpA_inv_right
  • Associativity & Congruence: rweq_tt, rweq_tt_symm, rweq_trans_congr_left, rweq_trans_congr_right
  • Symmetry Congruence & CongrArg: rweq_symm_congr, rweq_congrArg_of_rweq, etc.
  • Proof strategies: direct transitivity, calc-chains, and nested congruence
  • Transport Rules: rweq_transport_refl
  • Quick Start: construct a simple rweq proof using rweq_trans and rweq_cmpA_refl_left

Quick Start

Prove RwEq (trans refl p) p using path_simp or rweq_refl.

Frequently Asked Questions about rweq-proofs

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

FAQPage Schema
How do I construct RwEq proofs using transitivity and congruence in Lean?

RwEq proofs establish rewrite equivalence by composing transitivity, congruence, and canonical lemmas within the ComputationalPaths library. Use rweq_trans to chain equivalences, rweq_tt for congruence on subterms, and canonical lemmas like rweq_cmpA_refl_left to simplify path equalities in Lean with the LND_EQ-TRS rule set.

What lemmas do I need to prove path equalities and quotient reasoning?

Essential RwEq lemmas include rweq_refl for reflexivity, rweq_symm for symmetry, rweq_trans for transitivity, unit laws (rweq_cmpA_refl_left, rweq_cmpA_refl_right), inverse laws, congruence schemas (rweq_trans_congr_left, rweq_trans_congr_right), and rweq_transport_refl for transport-based reasoning in path equalities and quotient constructions.

Can I use RwEq proofs with path-tactics and calc-chains?

Yes, RwEq proofs support direct transitivity chains, calc-chain notation, and nested congruence patterns. Path-tactics integrate with the LND_EQ-TRS rule set to enable efficient proof strategies, and rweq_symm_congr and rweq_congrArg_of_rweq handle symmetry and argument congruence within larger proof structures.

When should I use congruence over direct transitivity in RwEq proofs?

Use congruence lemmas like rweq_tt and rweq_congrArg_of_rweq when equality holds on subterms or function arguments rather than at the top level. Direct transitivity works for chaining established equivalences; congruence is necessary when you need to lift equality from components to composite terms.

How do I simplify RwEq proofs of reflexive compositions?

Apply rweq_cmpA_refl_left and rweq_cmpA_refl_right to eliminate reflexive left and right compositions. For direct proof of RwEq (trans refl p) p, use path_simp or rweq_refl to discharge the goal immediately without manual transitivity chains.

Do RwEq proofs require specific ComputationalPaths library components?

RwEq proofs are executed within the ComputationalPaths library and use the LND_EQ-TRS rule set with path-tactics support. No external dependencies are listed; the Skill provides a self-contained lemma library for rewrite-equivalence reasoning in Lean formal proofs.