Kernel Diagram Widget #
This file provides meta infrastructure for displaying string diagrams for s-finite kernels in the
infoview. To enable the kernel diagram widget, you need to import this file and inserting
with_panel_widgets [KernelDiagram] at the beginning of the proof. Alternatively, you can also
write
show_panel_widgets [local KernelDiagram]
to enable the string diagram widget in the current section.
We also have the #kernel_diagram command. For example,
#string_diagram ProbabilityTheory.Kernel.deterministic_comp_copy
This is an adaptation of the string diagram widget where kernels are transformed into morphisms of
the SFinKer monoidal category using the kernel_hom tactic.
The kernelized penrose variable associated with a node.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Construct a kernelized string diagram from a Penrose substance program and
expressions embeds to display as labels in the diagram.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a kernel expression, return a string diagram. Otherwise none.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Help function for displaying two string diagrams in an equality.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given an equality between kernels, return a string diagram of the LHS and RHS.
Otherwise none.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a kernel or equality between kernels, return a string diagram.
Otherwise none.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The RPC method for displaying kernel diagrams.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Display the kernel diagrams if the goal is an equality of s-finite kernels.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Display the kernel diagram for a given term.
Example usage:
/- Kernel diagram for an equality theorem. -/
#kernel_diagram ProbabilityTheory.Kernel.deterministic_comp_copy
Equations
- kernelDiagram = Lean.ParserDescr.node `kernelDiagram 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "#kernel_diagram ") (Lean.ParserDescr.cat `term 0))
Instances For
Display the kernel diagram for a given term.
Example usage:
/- Kernel diagram for an equality theorem. -/
#kernel_diagram ProbabilityTheory.Kernel.deterministic_comp_copy
Equations
- One or more equations did not get rendered due to their size.