import Mathlib.MeasureTheory.Order.Lattice import Lean.Elab.Tactic.Location import Mathlib.Tactic.Widget.StringDiagram import Mathlib.Probability.Kernel.Composition.Prod import Mathlib.Probability.Kernel.Composition.CompProd import Mathlib.MeasureTheory.MeasurableSpace.Embedding import Lean.Meta.DecLevel import Lean.Meta.Transform import Lean.Util.Recognizers import Lean.Meta.Tactic.Replace import Lean.Meta.Tactic.Rewrite import Mathlib.Probability.Kernel.Deterministic import Mathlib.Combinatorics.Quiver.ReflQuiver import Mathlib.Probability.Kernel.Category.SFinKer import Mathlib.MeasureTheory.Integral.Lebesgue.Countable /-! # Standalone extraction for `KernelDiagram` Definitions are copied verbatim; theorem proofs are replaced by `sorry`. Auto-generated by Referee. -/ set_option quotPrecheck false -- Namespace stubs (so later `open`s resolve). namespace Finset end Finset namespace Lean end Lean namespace Lean.Meta end Lean.Meta namespace Mathlib.Tactic.Widget end Mathlib.Tactic.Widget namespace Mathlib.Tactic end Mathlib.Tactic namespace MeasureTheory end MeasureTheory namespace ProbabilityTheory end ProbabilityTheory -- ═══ ForMathlib.MeasureTheory.Order.Lattice ═══ section open Finset variable {α δ : Type*} [MeasurableSpace δ] [SemilatticeInf α] {m : MeasurableSpace α} [MeasurableInf₂ α] attribute [to_dual existing] MeasurableInf₂ end -- ═══ Tactic.KernelHom.Tactic.KernelDiagram ═══ section public meta section open Lean Meta Elab Command ProofWidgets Mathlib.Tactic.Widget open Mathlib.Tactic BicategoryLike Penrose Server open MeasureTheory ProbabilityTheory CategoryTheory open CategoryTheory open scoped MonoidalCategory ComonObj /-- Display the kernel diagrams if the goal is an equality of s-finite kernels. -/ @[widget_module] def KernelDiagram : Component PanelWidgetProps := mk_rpc_widget% KernelDiagram.rpc end