testRcdSubBot :: SpecWith ()
testRcdSubBot = test s "RcdSubBot" input output
  where
    s :: Syntactic '[TmApp, TyArr, TmBool, TmLam2, TyRecord, TmRecord, TyTop, TyBot, TmVar]
    s = crep
    input = [
      "\\x:Top.x",
      "(\\r:{x:Top->Top}. r.x r.x) {x=\\z:Top.z, y=\\z:Top.z}",
      "\\x:Bot. x x"]
    output = [
      "\\x:Top.x",
      "((\\r:{x:Top->Top}.r.x r.x) {x=\\z:Top.z, y=\\z:Top.z})",
      "(\\x:Bot.x x)"]
testRcdSubBot :: SpecWith ()
testRcdSubBot = test s "RcdSubBot" input output
  where
    s :: Syntactic '[TmApp, TyArr, TmBool, TmLam2, TyRecord, TmRecord, TyTop, TyBot, TmVar]
    s = crep
    input = [
      "\\x:Top.x",
      "(\\r:{x:Top->Top}. r.x r.x) {x=\\z:Top.z, y=\\z:Top.z}",
      "\\x:Bot. x x"]
    output = [
      "\\x:Top.x",
      "((\\r:{x:Top->Top}.r.x r.x) {x=\\z:Top.z, y=\\z:Top.z})",
      "(\\x:Bot.x x)"]
testRcdSubBot = test s "RcdSubBot" input output
  where
    s :: Syntactic '[TmApp, TyArr, TmBool, TmLam2, TyRecord, TmRecord, TyTop, TyBot, TmVar]
    s = crep
    input = [
      "\\x:Top.x",
      "(\\r:{x:Top->Top}. r.x r.x) {x=\\z:Top.z, y=\\z:Top.z}",
      "\\x:Bot. x x"]
    output = [
      "\\x:Top.x",
      "((\\r:{x:Top->Top}.r.x r.x) {x=\\z:Top.z, y=\\z:Top.z})",
      "(\\x:Bot.x x)"]