TorchLean API

NN.Proofs.RL.Tactics

RL Proof Tactics #

This file defines a small set of proof-focused tactics/macros used across NN/Proofs/RL.

Design goals:

References:

simp_rl is a simp-wrapper used across NN/Proofs/RL.

It unfolds the core one-step formulas by default:

continueMask is intentionally not unfolded by default, since many proofs keep it symbolic and only unfold it at the point they need case-splits on done.

Usage:

simp_rl
simp_rl [myLemma, myOtherLemma]
Instances For

    except_cases peels a successful Except do-chain by case-splitting an intermediate step.

    This is useful in trust-boundary proofs (where checkers return Except String _):

    • In the .ok branch, it gives you an equality h : e = .ok v and continues with payload v.
    • In the .error branch, it closes the goal by contradiction using the hypothesis that the whole chain succeeded.

    Example:

    have hOk : (do _ ← f; g) = .ok x := ...
    except_cases hf : f using hOk with v =>
      -- `v` is the `.ok` payload from `f`.
      ...
    
    Instances For