Lean Auto Dependencies

 Lean Auto Dependencies🔗

Inspect auto.demo.statement_target for a statement panel with one automatic edge and one manual edge, auto.demo.proof_target for the same split on a proof panel, and auto.demo.excluded_target for an automatic edge removed by an attribute exclusion. This file also enables set_option verso.blueprint.autoDeps true for the examples that use (lean := "...") and inline Lean code. Inference follows unassociated helpers by default.

Definition1
uses 0
Used by 3
Reverse dependency previews
Preview
Theorem 4
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

Tagged source declaration used by another declaration's type. Edges to this node can pass through unassociated type aliases without giving those aliases nodes.

Lean code for Definition1●1 definition
Theorem2
uses 0
Used by 3
Reverse dependency previews
Preview
Theorem 5
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

Tagged source theorem used by another declaration's proof. Edges to this node should appear on proof dependency chips, not statement dependency chips.

Lean code for Theorem2●1 theorem
  • theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoProofSource :
      True
    theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoProofSource :
      True
Theorem3
uses 0
Used by 3
Reverse dependency previews
Preview
Theorem 4
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

Manual comparison dependency. This edge is written in the attribute options, so it should stay manual while inferred edges are marked automatic.

Lean code for Theorem3●1 theorem
  • theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoManualExtra :
      True
    theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoManualExtra :
      True
Theorem4
Statement uses 2
Statement dependency previews
Preview
Definition 1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1✓L∃∀N

The Lean statement uses autoDemoTypeAlias, which leads to autoDemoTypeSource, so automatic dependency inference adds auto.demo.type_source. The attribute also adds auto.demo.manual_extra manually, making the statement dependency panel show both origins side by side.

Lean code for Theorem4●1 theorem
  • theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoStatementTarget :
      autoDemoTypeAlias
    theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoStatementTarget :
      autoDemoTypeAlias
Theorem5
uses 0used by 1✓L∃∀N

The Lean statement is just True, so there is no inferred statement dependency. The proof below reaches autoDemoProofSource through autoDemoProofHelper.

Lean code for Theorem5●1 theorem
  • theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoProofTarget :
      True
    theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoProofTarget :
      True
Proof for Theorem 5
Proof uses 2
Proof dependency previews
Preview
Theorem 2
Loading preview
Proof dependency preview content is loaded from the rendered-fragment cache.

The Lean proof body reaches autoDemoProofSource through a helper, so automatic dependency inference adds auto.demo.proof_source to the proof dependencies. The attribute also adds auto.demo.manual_extra manually for comparison.

Theorem6
uses 1used by 0✓L∃∀N

The Lean statement mentions autoDemoTypeSource, but the attribute excludes auto.demo.type_source. Only the manually listed auto.demo.manual_extra dependency remains.

Lean code for Theorem6●1 theorem
  • theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoExcludedTarget :
      autoDemoTypeSource
    theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoExcludedTarget :
      autoDemoTypeSource
Theorem7
uses 1used by 1✓L∃∀N

This node points at an existing compiled Lean declaration with (lean := ...). The file option enables automatic dependencies, so the declaration's type and proof body provide statement and proof edges through the same helpers.

Lean code for Theorem7●1 theorem
  • theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoExternalTargetDecl :
      autoDemoTypeAlias
    theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoExternalTargetDecl :
      autoDemoTypeAlias
Definition8

This node has an inline Lean block. The file option also enables automatic dependencies for the declarations defined in the block.

Lean code for Definition8theorem autoDemoInlineTargetDecl : autoDemoTypeAlias := ⊢ autoDemoTypeAlias All goals completed! 🐙
Theorem9
uses 0used by 0✓L∃∀N

This node points at a compiled Lean declaration, but locally disables automatic dependency inference.

Lean code for Theorem9●1 theorem
  • theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoExternalOptOutDecl :
      autoDemoTypeSource
    theorem Verso.VersoBlueprintTests.BlueprintAutoDeps.Preview.autoDemoExternalOptOutDecl :
      autoDemoTypeSource
Theorem10
Statement uses 4
Statement dependency previews
Preview
Theorem 4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0XL∃∀N

A prose-first node links to the inferred targets with ordinary manual dependencies: Theorem 4, Theorem 5, Theorem 7, and Definition 8.

Contents

  1. Dependency Graph
  2. Blueprint Summary