Skip to content
  • sheaf's avatar
    Use Reductions to keep track of rewritings · 7a9d8803
    sheaf authored and Marge Bot's avatar Marge Bot committed
    We define Reduction = Reduction Coercion !Type.
    A reduction of the form 'Reduction co new_ty' witnesses an
    equality ty ~co~> new_ty.
    That is, the rewriting happens left-to-right: the right-hand-side
    type of the coercion is the rewritten type, and the left-hand-side
    type the original type.
    Sticking to this convention makes the codebase more consistent,
    helping to avoid certain applications of SymCo.
    
    This replaces the parts of the codebase which represented reductions as
    pairs, (Coercion,Type) or (Type,Coercion).
    
    Reduction being strict in the Type argument improves performance
    in some programs that rewrite many type families (such as T9872).
    
    Fixes #20161
    
    -------------------------
    Metric Decrease:
      T5321Fun
        T9872a
        T9872b
        T9872c
        T9872d
    -------------------------
    7a9d8803