AFTD Auto-Formalizing Theoretical Domains

Matching

structureimported Lean

A matching is a partial bijection between M and W. matchM i is the partner of i ∈ M (or none if unmatched). matchW j is the partner of j ∈ W (or none if unmatched).

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
@[ext]
structure Matching (M W : Type*)
Defined in
EconCSLib, `Matching`
Lean proof
By xbei (from the file's git history), from github.com/gametheoryinlean/EconCSLib at 1a88f809b538 (Copyright (c) 2026 EconCSLib contributors. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.30.0.
Verified
08 Oct 2026
Axioms
none listed
Used by 58

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
/-- A matching is a partial bijection between `M` and `W`. `matchM i` is the partner of `i ∈ M` (or `none` if unmatched). `matchW j` is the partner of `j ∈ W` (or `none` if unmatched). -/
@[ext]
structure Matching (M W : Type*) where
  /-- Partner of each agent on side `M`. -/
  matchM : M → Option W
  /-- Partner of each agent on side `W`. -/
  matchW : W → Option M
  /-- Consistency: `matchM m = some w ↔ matchW w = some m`. -/
  consistent : ∀ (m : M) (w : W), matchM m = some w ↔ matchW w = some m
See it in the graphDiscuss this resultChallenge it