This challenge, if you accept it, is to write three functions or programs A, B, and C:
- A is a quine that outputs all of A,B and C (which is also the whole content of the code in your submission).
- B takes a parameter F and checks whether it is such a quine (outputting FBC), or doing something different.
- C takes a parameter G and checks whether G possibly works like B (checking whether F outputs FGC). It is impossible to decide whether a function is a quine checker, so let's do something simpler:
- It must return truthy if G is valid for B.
- It must return falsey if G returns falsey for all valid quines, or G returns truthy for all valid non-quines.
- It can return anything, crash or not terminate, etc, if it is any of the other cases.
Note that B is possible. A and F doesn't have any input, so you can just run them and check the result.
Rules
- There should be some way to tell which parts are A, B and C from the output of A. For example: each has one line, or they are recognized as three functions in the interpreter.
- Each function should run with only the definition of itself, not your complete code.
- You can use a function/program or its source code, or a pair of both as the input of B (or G) and C.
- You can redefine truthy/falsey to a subset of those values. You can also consistently require F returning some type you choose, like a single string.
- You can require A, B, F and G, if they are called with valid parameters, consistently don't have some types of other inputs or side effects you choose, such as accessing global variables, or reading stdin, etc.
- You can also assume F and G, if they are called with valid parameters, always terminate.
- F should work in the same condition as A. So it cannot depend on B or C or another variable's existence, unless that variable is defined in its own part in its output.
- No functions or programs can read its own source code.
- This is code-golf, shortest code (which is the output of A) in bytes wins.