def make_slim_provenance_dict(model_type, slim_generation):
    """
    Returns a dictionary encoding necessary provenance information for a SLiM tree sequence.
    """
    document = {'schema_version': '1.0.0', 'software': {'name': 'SLiM',
        'version': '3.3.2'}, 'parameters': {'command': ['pyslim'],
        'model_type': model_type}, 'environment': {}, 'metadata': {
        'individuals': {'flags': {'16': {'name':
        'SLIM_TSK_INDIVIDUAL_ALIVE', 'description': 
        'the individual was alive ' + 'at the time the file was written'},
        '17': {'name': 'SLIM_TSK_INDIVIDUAL_REMEMBERED', 'description': 
        'the individual was requested ' + 'by the user to be remembered'},
        '18': {'name': 'SLIM_TSK_INDIVIDUAL_FIRST_GEN', 'description': 
        'the individual was in the first ' +
        'generation of a new population'}}}}, 'slim': {'file_version':
        '0.4', 'generation': slim_generation, 'model': ''}}
    return document
